What makes the psychology of tribalism so stubbornly powerful is that it consists mainly of cognitive biases that easily evade our awareness. Indeed, evading our awareness is something cognitive biases are precision-engineered by natural selection to do. They are designed to convince us that we’re seeing clearly, and thinking rationally, when we’re not.
As for which cognitive bias to blame: A leading candidate would be “attribution error.” Attribution error leads us to resist attempts to explain the bad behavior of people in the enemy tribe by reference to “situational” factors—poverty, enemy occupation, humiliation, peer group pressure, whatever. We’d rather think our enemies and rivals do bad things because that’s the kind of people they are: bad.
With our friends and allies, attribution error works in the other direction. We try to explain their bad behavior in situational terms, rather than attribute it to “disposition,” to the kind of people they are.
You can see why attribution error is an important ingredient of tribalism. It nourishes our conviction that the other tribe is full of deeply bad, and therefore morally culpable, people, whereas members of our tribe deserve little if any blame for the bad things they do.
The left demonizes the right, not only the leaders on the right, but also those who follow them.