“Code Geass: Lelouch of the Rebellion” takes place in an alternate history, but one without a single divergence point. In the “CG” timeline, Britain put down the American Revolution. However, a few decades later, Napoleon successfully took the British Isles. Thus, the Royals fled to the American colonies, which became the new homeland of the “Holy Britannian Empire.” By the 2010s, the Britannians have invented mechs called Knightmares (this is an anime) and conquered a third of the world. Lelouch, a Britannian prince exiled to Japan, leads a rebellion as the masked “Zero.”
The Britannians are practically a parody of Western Imperialism — in season 2, they develop a nuke analogue, the Field Limitary Effective Implosion Armament (F.L.E.I.J.A.). Even in a timeline unrecognizable from our own, humanity will always develop the capacity to destroy itself. Likewise, the site of the initial FLEIJA demonstration is Tokyo, which is not just burnt to a radioactive crisp but outright vaporized.
Lelouch, as part of a complex plan to bring about world peace (by making himself a villain to be defeated), seizes control of an orbital, FLEIJA-launching base called Damocles. With that power, he declares himself Emperor of the World. As in reality, powers with weapons of mass destruction can bully other nations into compliance. Part of the happy ending after Lelouch’s death is Damocles drifting into the sun along with the remaining FLEIJA warheads. Unlike the real world, the atomic genie is put back into its bottle, where it should’ve remained all along.