I took the ending to mean that Loki is no longer in the prime timeline, he was sent to a universe he hadn't existed in. Kang pruned other universes to prevent other variants from not becoming him, that way the evil ones wouldn't gain control and attack other universes.
Now that he's dead, the other branches may be taking that "one timeline always" a bit further to mean destroy all timelines and are still unaware they're variants because they are still subservient to their Kang whether they know who he is or not.
More simply, this is Marvel's way of bringing in anyone they want, including older characters like Logan or Doc Ock, dead characters like Quicksilver, obscure characters like Deadpool, or new characters like F4, the Living Tribunal, or X-Men.
Now frolicking in the Quantum Realm will have significant consequences.