Palpatine "out of nowhere" was the one thing that made sense. the only through line for the ST was them recycling OT characters, bringing them back in half-assed and desperately commercial ways, and then killing them off. they used Han Solo. they used Luke Skywalker. they used Chewie, R2, C3PO, and Leia. they used the Millenium Falcon. they used AT-AT walkers. they used the "Help me Obi Wan Kenobi" hologram. they used the twin suns. twice.
the list of things from the OT they used was long. completely silly to say that nobody saw the Emperor, the main villain in 4 out of the original 6 Lucas films, would be coming back. somehow they will use everything from the OT but leave him out.
they talked to all the original actors including him during the initial ST talks. the entire reason behind purchasing $4 billion dollars worth of character designs is so that you can use them. them shooting their load with nostalgia, necessitating the Emperor coming back as a budget-minded scraping the intellectual barrel, was probably the most sure bet in the entire series.
as for him suddenly showing up in the crawl, i wish people would stop saying this is a flaw. that is how these adventure serials work, they drop you in the middle of a story. do people even remember that is how the first Star Wars movie starts?