The Ego is a defense mechanism, the function for survival and protection it controls our behavior for social success, hard-wired into our evolutionary instincts, into our primal social cues. When we sense any threat of being ostracized from the group. The defense mechanism, triggered like an anti-virus software. Fall in line, don’t rock the boat, walls go up, carry on the pretense and assimilate to the social norms, pressures to conform.
A herd of animals ostracizes and pushes out any individual animal that doesn’t act or follow the same behaviors. It can be a threat to their survival, that individual animal is unpredictable it may draw attention from a predator, it may have bad habits that spread to the rest of the herd.
This is the kind of social imprinting that is in our instincts. But for humans the margin of error for survival in a social context is well past life or death. But the social imprinting is still there, we still feel the urge to ostracize and separate from people that don’t look or sound like us. Language. Beliefs. Thoughts. Behavior. Drive the right car. Believe the same beliefs. Say the right things. Fly the right flag. Ostracize or be ostracized.