If a person wears a t-shirt emblazoned with your favorite football club, you feel relatedness with that person.
If others belong to a membership that you joined, you feel they are in the same team as you.
We perceive people outside of our groups to be outsiders. People who don't share the same values as we do.
Belongingness may cause cognitive errors. In a serious case, you may decide to go to a war you don't agree on. You can be made to put your life in line for something that means nothing to you.