Megatron's case (this applies to the Aligned continuity version of him, so this'll include the WFC/FOC games, and TF Prime)
First off, in my client's defense, he was oppressed by his cruel leaders and their unfair fast system and made him do gladiatorial combat for their amusement, and initially he had no plans of a violent uprising, instead trying to bring change to the system, but it was the corrupt actions of Zeta Prime that drove him to a more violent route. And let's not forget that he also injected himself with Dark Energon, a substance KNOWN to have unforseen effects on any transformer to use it, so it can be up for debate whether or not Megatron was even in his right mind throughout the events of Transformers Prime, and by the end of the series, he no longer wanted to oppress anyone else, and disbanded his forces. This does not excuse his crimes, but this goes to show Megatron was a victim to the corrupt systems of Cybertron's government