Look, this is a very rough and sketchy idea, but anyway. I'm about to completely destroy anything built by the comics by the way, because they aren't canon. My idea, Optimus Prime was built by the Quintessons to end the war. As said, Sentinel was the Leader before Optimus. Let's say Optimus started out life as Orion Pax (yeah, now I'm pushing it), and he was a Librarian/Cop/Whatever, and Orion is absolutely obliterated in an attack by the Decepticons and basically left for dead/scrap, whatever. Let's say the Quintessons are at this time ally's of the Cybertronians (the Autobot half anyway). The Quints in the movieverse are a little more the whole "knowledge of all wisdom" type, and because they want the Cybertronian war to end for the fear of their race's extinction, they seek to a way to end the war. At random they find Orion due to a "feint sprak in his spark", or think he is the best for the job, whatever, rebuild him he's Optimus. Present him to Sentinel, Optimus can't remember anything as Orion, pretends to think he is entirely like any other Cybertronian in origin, Optimus rises through the ranks. Optimus kills Sentinel (who in their eyes is the Autobot Leader), say Optimus went on a rampage, send Lockdown out to retrieve him. To the Quints, Optimus is a maniac, he's on recall, you name it. And they want to terminate him. They could even think of him as a threat to themselves or anything if to them Optimus basically killed his father figure. "You think you were born? You were built, and they want you back."