It's always been my beleif that a good villain should in some way mirror the hero. Given what I've read about their backstories it's clear to me that Megatron embodies this concept.
Megatron, a character from the lowliest pits of Cybertron. A born fighter who sees injustice and inequality in the masses of his homeworld. Rises up to challenge the leadership of that world and gets branded a traitor. Joined by legions of loyal followers who believe in those ideals, but who in time, much like their leader, become corrupted by their constant figthing and warring on one another that those ideals have descended into nothing more than a need to defeat theri enemies for no other reason than to defeat them.
But Optimus. He too rose from obscurity. Initially on the side of those who were the oppressors to the masses, but who saw the injustice there, just like Megatron. Though not a fighter, the war with the Decepticons forged him into one. Like Mgeatron, he too gained a loyal following, but through his integrity and the respect one gains only by giving it to others first.
These two really are mirror images of one another. And if the TV shows or movies (if there ever is another movie) can get that characterisation down just right, it would be the best Transformers-related story ever made.
Apologies for going on so much about this, just had to get it off my chest.