Fundamental attribution error. It is not good to assume a mental defect on vast swaths of the population. That itself is attributing an irrational motive for their actions before considering if there may be a rational one. That is itself is the definition of uncharity. (But in a different capacity that what I outlined above)
Again, consider that many of these folks are doing so from a rational choice, which is to defeat the other side - they understand it to be a zero-sum contest. You can either win or lose, your choice.
Well, I guess that's what I'm getting at: is it really rational to assume that it's a zero-sum game? The history I've studied indicates it is not, at least until the totalitarians show up. But the antidote to totalitarianism isn't better totalitarianism, it is refusing to look at your neighbors as politically binary.
Seems to me, honestly, like a fair hypothesis for our tribal behavior. Moreso, to be honest, than the majority of people "understanding it to be a zero-sum contest".
I'm exaggerating a bit to make a point (my actual view is slightly less Stark) that I think gets brushed off or overlooked too easily (but is important)
I think the reasons are more multivariate than a single psychological principle. But yes, in-groupism is a component I do think. But that is a component against the backdrop of societal and geographical sorting among a whole set of preferences and values e.g. (can predict a lot more about you if you are blue or red because we've all sorted ourselves) as an example of another component.
Again, consider that many of these folks are doing so from a rational choice, which is to defeat the other side - they understand it to be a zero-sum contest. You can either win or lose, your choice.