Megatron turns into a gun.
Wow, what a weird idea for the leader of an army of evil robots. Completely by accident, this turned out to be bizarrely effective and turned the big trigger-happy lug into one of the most beloved villains of the 80s. But first a little background.
A Little Background
Hasbro marketed the Transformers, but they didn't create them. In fact the toy series that we know as the Transformers were actually two different toy brands from Japan. One of them was a series of vehicles with drivers (Diaclone), and the other was a series of everyday objects (Microchange). They both transformed into robots, but they weren't part of the same line until Hasbro licensed them both. Megatron was from the Microchange line, and transformed into a Walther P.38 handgun. Other toys, such as Jetfire (Skyfire) and Shockwave came from other transforming robot brands, of which Japan seemed to have a near-endless supply.
When Hasbro got their hands on the toy lines, they brought them together into a single continuity as the Transformers. The regular vehicle toys became the heroic Autobots, and the military vehicles and Microchange toys (also including Soundwave and Reflector) became the evil Decepticons. Later in the series that distinction would be eliminated (e.g. Microchange toys Blaster and Perceptor were added as Autobots), but that formed the general basis for the series.
Now infamously, the Microchange-based Transformers were often seen to be capable of changing their physical size in the cartoon. Well everyone was shown to change sizes from time to time, but most of that was animation errors and shoddy artwork. The Microchange robots did it intentionally. Although Megatron was 30' tall in robot form, when he transformed into a handgun he suddenly shrank down to a size where other 30' tall robots could hold him, and once in a while even shrank down to human handgun size. Usually, Starscream or Soundwave would fire him while transformed, but others also got a chance now and then, including Optimus Prime once.
It may be interesting to note that the other gun transformer, Shockwave, never shrank down so someone else could fire him. Unlike Megatron, he was shown to be somehow capable of hovering in midair and firing himself at full size. However in one episode he was shown wielding a gun that looked just like his own transformed mode and in another, he was picked up and fired at full size by the giant Gestalt, Bruticus.
Megatron: Both General and Primary Assault Weapon
Anyway, coming back to my main topic, Megatron was not only the leader of the Decepticons, but also their most powerful weapon. While his arm-mounted cannon (which transformed into the scope of the handgun) was one of the more powerful weapons in the series, his transformed gun mode was shown to be a weapon without equal. In Transformers: The Movie, single shots at close range were able to kill several of the Autobots to make room for the new toys that were being released.
Now consider for a moment if Megatron weren't the leader of the Decepticons. Being the most powerful weapon they had, he would probably never see action as anything other than a handgun. Why let him transform into robot mode when he would be more valuable as a weapon than a soldier? That would make him an awfully dull character. Obviously the only thing to do with him is make him the leader so he has something else to do.
But what a stroke of genius that turned out to be! As the leader of the Decepticons, Megatron was responsible for setting their goals (steal energy), selecting targets (power plants), and forming strategies (take everything that isn't bolted down and destroy the rest). The battle tactics and execution of the plans were left up to his lieutenants Soundwave and Starscream.
Now in the opening stages of a battle, it's key to level the maximum amount of firepower possible at the target. Meanwhile the general sits back, watches how the battle develops, and decides how to alter the plan or whether to consider retreat. So before the battle the general is all-important and the weapons just sit around, and in the opening moments of battle the weapons are all-important and the general just sits around. Megatron achieves maximum efficiency by covering both roles himself!
The way things typically turned out, Megatron would be available to add extra firepower whenever the Decepticons needed a bigger gun more than they needed their master strategist. In the closing moments of battle, he would typically engage Optimus Prime personally, being the only Decepticon who was the equal of the Autobot leader. The series was exciting and enthralling for the children of the 80s because both sides had strong, confident, and capable leadership. Then they had to go and ruin it all.
Then Hasbro Went and Ruined It All
In Transformers: The Movie, Optimus Prime and Megatron finally met in their final battle, one-on-one, after both showing themselves to be more than a match for any of the opposition's rank-and-file troops. They clashed with the fate of the two day long battle for Autobot City resting on the outcome. Whoever won would turn the tide of victory to his side. As it turned out, they were an even enough match that they both suffered fatal wounds, and the Decepticons retreated, leaving the Autobots with a bittersweet victory.
To make a long story short, Megatron was replaced with Galvatron, Optimus Prime was replaced with Rodimus Prime, and our favorite cartoon was replaced with a pile of crap. Galvatron was psychotic and unstable, the polar opposite of Megatron's calculated cunning. Rodimus Prime was unsure of himself and reluctant to hold the mantle of leadership, the polar opposite of Optimus Prime's sure and steady confidence. Left without effective leadership on either side, the show died a slow and painful death. The return of Optimus Prime in the Season 3 finale was too little, too late to save it.
Although I suppose the shoddy editing and increased frequency of animation errors didn't help.