My favorite Star Wars conspiracy is that the Emperor wasn't spending all those resources creating crazy superweapons like the Death Star and the Sun Crusher and putting together gigantic fleets of Star Destroyers wasn't to stop the Rebel Alliance, but rather in preparation of the Yuuzhan Vong Invasion that would happen about a quarter century after RoTJ ended.
Now the Emperor is a pretty smart guy. I mean, he got himself elected to Chancellor of the Republic, started a war, earned himself absolute control on both sides of the war, then managed to turn the galaxy against the guys who for a millennium had served as icons of peacekeeping, justice, and democracy. And that takes some serious strategizing! But here's the thing:
At this point, the Republic was falling apart, with or without a Sith-led Separatist movement to nudge them in the wrong direction. The senate was a clusterfuck where nothing ever got done. Corruption reigned supreme. Even the Jedi Council wasn't doing it's job properly. Ideally, Jedi are supposed to act as bastions of compassion and moderation. The way the Jedi would be tasked to deal with a situation is as a balancing influence between, say, two conflicting nation-states, or a particularly quarrelsome trade agreement. Everyone respected and would listen to a Jedi, and even without acting on behalf of the Republic, they should be able to arrive on a scene and be able to allow discussion and bureaucracy to flourish.
Instead, the Jedi Council of the waning days of the Republic had grown inward and conservative, spending all their time meditating on the state of the galaxy and not enough time heading out there and fixing shit. This held throughout the war, when Jedi were surprisingly quick to jump to open combat as opposed to discussion.
In short, the Republic was completely and utterly unprepared for a real invasion, from a force that wasn't being controlled by a puppetmaster who was preventing either side from gaining an advantage until the moment was right. The kinds of fleets that were commonplace in the Empire would have been impossible for the Republic to even agree to create, let alone have the wherewithal to actually build. What Palpatine did was take a failing system and tear it out by the roots, replacing it with a brutally efficient, military-industrial focused society - one that could adequately prepare for an invasion of the scale of the Yuuzhan Vong were already beginning.
Second of all, if you think about it, creating a weapon that can destroy planets doesn't make a whole lot of sense when you're fighting a war against a well funded, but decentralized and scattered rebellion. The Rebel Alliance wasn't fighting a war of planets or borders or resources, they were fighting a war of attrition. What good is the ability to destroy a planet when your enemy doesn't even officially control any? The destruction of Alderaan, the only notable use of the Death Star, was a move made by Grand Moff Tarkin, whose Tarkin Doctrine, though it heavily influenced the way the Empire kept a tight grip on even the furthest systems, was not the ultimate purpose of the "ultimate weapon". Tarkin was convinced that the Death Star was his tool, one of intimidation and despotism, that he could use it to keep the Alliance, the biggest threat to his power, at bay. And we all know how that venture turned out.
No, the real purpose of the Death Star was to be able to fight a force that could completely terraform an entire planet into a gigantic, organic shipyard in a matter of months, and was backed by dozens of 100+ Kilometer across worldships. In fact, without the timely arrival of the seed of the original Yuuzhan Vong homeworld, Zonama Sekot, and a Jedi-influenced heretic cult that spurred a slave uprising, it's very unlikely that the denizens of the galaxy could have survived the war at all under the leadership of the New Republic. In fact, it's not really even fair to say that they "won" the war in any sense, with a sizable portion of the population of the galaxy eradicated, Coruscant, the former shining jewel at the heart of every major government for millennia, captured and terraformed beyond recognition, and the New Republic forced to reconstruct itself as the Galactic Alliance. Undoubtedly, for all it's flaws, the Empire could have hammered out a far less Pyrrhic victory over the Vong. And if Palpatine hadn't underestimated the abilities of both the rebellion he never considered a comparable threat, and one young Jedi, perhaps the galaxy could have avoided the deaths of uncountable sentients during the Yuuzhan Vong war years later.
TL;DR: The Emperor destroyed the Republic and built Death Stars to fight off an extragalactic invasion.
REPOST ADDENDUM: Since I didn't include this the first time around, there is ample evidence to suggest that Palpatine knew the Yuzhaan Vong were preparing an invasion. It's clearly outlined that the Chiss were aware of the Vong (Though perhaps not the threat they posed) at least as early as 27 years before the Battle of Yavin, along with Palpatine, who in Outbound Flight explains his purpose behind destroying the eponymous expedition was to prevent the discovery of an "immensely powerful and hostile alien empire" heavily hinted to be the Vong. So there you have it: Solid proof that Palpatine was aware of the Yuzhaan Vong as well as the threat they posed, 5 years before the Clone Wars even began (22 BBY).