At parties, small social groups define themselves by the people they don’t allow in as much as the people they do. Being in a social group implies inclusivity as well as exclusivity.
In the same way, larger groups of people are also defined by who is in and who is out. The citizens of ancient cities constructed walls around them to keep other people out, but those walls also gave them a feeling of belonging to something within those defences.
Societies are defined by their own rules, and special badges of one form and another denoting membership. All these things signify belonging to the group by expressing signs of membership and living within certain boundaries — speaking the language, dressing the right way, behaving the right way, believing the right things.
Boundaries are more than city walls or lines on maps, they are — in a very Wittgensteinian way — interpretations.
Membership of a group or a society comes with special advantages. That’s why people join them. Alternatively people are born into them and there is friction should they wish to leave. Leaving a group can be seen as disloyalty or betrayal. When a group can no longer provide sufficient advantages, people leave it for another one.
So, what does all this have to do with writing stories?
Protagonists are usually trying to: escape from a group, join a group, or cross over from one group to another. There are many reasons for doing this: to get ahead in life, to discover a secret, to sabotage an enemy, to gain status, for material gain, to avoid something, to hide, to evade repression, to get a job, to see the world, to feel more human, to live more honestly, to carry out a mission, be more truthful, to escape lies. These are all character motivations.
The divide between two groups is often a divide between those with power and those without power, or between two groups seeking to dominate the other — competition. Membership implies advantage — those with less seek more. Those in possession of something stop others from possessing it (territory, market access, customers, wealth, knowledge, water, etc). The space between groups represents a divide: a class divide, a taste divide, a behavioural divide, etc. These are the boundaries between acceptable and unacceptable behaviour, between law abiding citizens and people acting illegally, and often between the perception of good and bad.
Protagonists either fight their way out of a group, or they fight their way into one. They begin in the wrong group, or are thrown out of their favoured group (striving to rejoin it, or joining another group to fight against it). A protagonist’s journey involves crossing over into another group, possibly multiple groups, and learning how those new groups work, adapting to their rules and behaviours to achieve his or her goal.