Bismillaah:

Sitting between two people who are already sitting close to each other is not proper, except if they allow and make room for the newcomer.

Abdullah bin Amr رضي الله عنه said:

The Prophet صلي الله عليه وسلم said:

"It is not lawful for a man to separate two people except with their permission."

Takhreej:

{ Imam Abu Dawud in his Sunnan and it's chain declared as Hasan by Imam al Tirmidhi, Abu Taahir and Shu’aib al Arna’ut }

The scholars state while commenting on this hadeeth that among the cause of the prohibition is that probably there is a family relationship among them, a secret to be discussed or a trust to be fulfilled. So, separating them by squeezing in may burden them both.

{ Mirqat al Mafatih Sharh Mishkat Al Masabih 7/2976 }

Therefore, the prohibition of squeezing in between others who are sitting is for the purpose of avoiding any unpleasant feelings, hatred, animosity etc among humans. Hence, the religion prohibits this action unless one got the permission to do so.

*** And Allaah عزوجل knows best ***