Forming groups is a basic human drive. Modern humans are all simultaneously members of many groups — there is the book club, your poker buddies, all those fellow sport team enthusiasts. Most basic of all these groups is the connection we form with our society. This is one group people have always been willing to die for. During most of human history, foreigners have been shunned or killed. Allowing an outsider to join a society is typically an arduous process, when it is permitted at all.
A fundamental attribute of any society is that it has a clearly defined membership. It is possible for a species to be social and yet not form societies: consider herds of zebra, where the animals interact socially but can readily enter and leave the group. A society is different. It is defined by the capacity of its members to distinguish one another from outsiders, and reject outsiders on that basis. For most animals, however, surprisingly few studies have been done on this key feature of social life.