So I want to take a second to dwell on He-Who-Remains. Let's just call him HWR for short. He's Kang. But he's not KANG. He's the low calorie Kang Zero Sugar. Sure, he's a narcissistic tyrant who commits multiversal genocide, but wait until you meet his variants. Because they are somehow even worse.
He's the King of Everything. He can, through his seeming omniscience, manipulate the very fabric of time and space in such a way that he is effectively the ultimate power in creation. Not even Infinity Stones can hinder or influence him, or the TVA, which he created to carry out his bidding. And the only thing in the potentially infinite multiverse that he fears, or that can threaten his power, or his grip on reality, is himself.
Which is why the TVA even exists. It is it's sole purpose and mission statement. Prevent any change or deviation in time that would result in a divergent, variant Kang. Changes in the timeline, branches and variations, are totally fine, so long as they don't result in another Kang. Classic Loki was left to his own devices so long as he remained in isolation and exile, maintaining the effect of his "death" if not it's fact, and was only pruned when he grew lonely and attempted to rejoin the universe. His very long life didn't create enough ripples in time to draw the TVA's notice.
Anything that is erased by a cataclysm, or which self corrects over the long run and restores the ultimate status quo is perfectly acceptable. Hence the Avengers in Endgame, left to their machinations, because their actions don't ultimately create enough of a divergence in the path of "The Sacred Timeline." That is to say, they don't alter history significantly enough to create a rival Kang.
But a LOT of Lokis have been pruned. There is a whole army of feuding Lokis at the end of time, survivors all, who were pruned as dangerous variants. Even in a system as ordered as the TVA's, Loki is a bug in the system. God of Mischief, indeed. Loki, or rather all the Lokis, are practically branch generators. Their actions, the difficult to predict mayhem and even their flexible and often changeable moral compasses make them the ideal candidates to break out of the rigid system HWR has created.
If HWR is the ultimate God of Order, then Loki is his nemesis. A god of chaos.