We don't know how it happend. We don't know how Noctis came to Eorzea, or how the FFXV version of Garuda came there, or how she could open a portal back to Garuda.
I don't think the writers know that either.

In reality it all happened because the developers thought it was a cool thing to happen, and that is all the reason there is behind it.
Don't think too hard about lore-based answers to the crossovers, because usually there are. Just a bunch of handwaving.