Q: is there a regularity or a pattern of the modulation when it sounds weird magical whatever?
A: it has a lot to do with the whole context of what is going on in the music and the story it's telling