As the leader of the Decepticons, Megatron is a very evil robot indeed. He wants to destroy the much friendlier breed of Transformers, the Autobots and, as is the classic trait of a relentless baddie, he will stop at nothing to do it.
Humans are merely a minor interruption which, as real-world technology gets more efficient, is a very genuine concern.