The mega server system has a priority system that it uses to pick which instance of a map it places you in.
Map state (full/closing) -> party/squad -> friends list/guild -> home server.
For first it tries to place everyone in a party onto the same map. If you're not in a party the game will see if there's an instance where you have friends and/or guildmates. If it can find those it tries to group people by home server. Otherwise, it throws you into whichever instance has room and isnt set to close.
Yeah theres a lot of rpers in the game...more than you'd think.