Sending an invitation to someone via the friends list means invitation to your squad, and your squad members are forced to join you regardless to whether you're in game or in menu. As such, accepting an invitation means joining your squad and ending up in the menu since you are there.
But since the invited person now is in your squad (his nick appears in your squad list), if you join a server he does too, automatically.