I agree that setting up Palpatine’s turn in TLJ would have been a bad idea. That’s why I kind of don’t think it’s a good idea to set it up in fanedits, it just undermines TLJ and barely improves TRoS.
But it’s not that it was “meant” to come out of nowhere or anything. Palpatine’s return not being set up well hurts TRoS pretty badly. Setting up Palpatine’s return in TLJ is a bad idea, having Palpatine return without a setup is a bad idea, therefore having Palpatine return at all is a bad idea. Although there are plenty of other reasons why Palpatine’s return was a bad idea.