In 1982, Joe science teams uncovered an alien spacecraft and studied it, which gave them a huge technological edge. They use this edge to enforce their will across the world. Discovering ancient alien robots in the Ark, the Joes did they best they could with limited technology to bring them back to life. A few were repaired and given new Joe vehicle altmodes. However, not all of the bots repaired were Autobots, and many of the Decepticons immediately left the Joes to seek their fortunes elsewhere. One of them, called Megatron, gathered some of the others and built an undersea base, far away from prying human eyes...
The Joes recruited retired G.I. Joe spy Sparkplug Witwicky to lead the ongoing Ark Project. Sparkplug was tasked with the duty of bringing back the remaining offlined Autobots and assimilating the awakened Autobots into Earth's culture. Sparkplug isn't the only Witwicky to work with the Joes. Sparkplug's youngest son, Buster, was recruited while he was still in college to be a computer code cracker. In the early '80s, Susan Witwicky (also an undercover Joe agent) was killed by an unknown assailant in front of Spike, the eldest son of Susan and Sparkplug. That event traumatized Spike to the point where he became extremely depressed and eventually suicidal.
In the Joe world universe, General Flagg and Lieutenant General Hawk leads a worldwide peacekeeping force called G.I. Joe. They are assisted by their XO, Brigadier General Flint, who oversees the Ark Project. The Ark Project recovers and rebuilds damaged Autobots into G.I. Joe vehicles. With Optimus Prime as yet unrecoverable, the Autobots on Earth deferred to Generals Hawk and Flagg.
When Code Buster uncovered the truth that G.I. Joe was responsible for the death of Susan Witwicky, the Bots kicked the Joes out of the Ark, with the exception of a few sole exceptions, including General Flint.