Attempting to use logic to explain how this works won't get you anywhere. Because you can still use Latios as a Pokemon in battle, we know that it wasn't released. It's just something they did to make the soaring feature work.
commented 1 hour ago by Hellfire Taco
As Hellfire Taco said, you can still use it in battle, which means it can't be released. I wouldn't look into it too much, Gamefreak just decided they wanted to have it pick you up to fly with it and probably didn't worry about the logistics of it. If you really want some sort of explanation, you could say that someone in the Pokecenter takes it out of the PC for you, or that it can leave the PC itself due to the fact it's a legendary, kind of like how Pokemon can get out of Pokeballs on their own in the anime.