Below is a TED talk by Jonathan Haidt, the social psychologist who wrote The Righteous Mind, in which he introduced six belief categories: important issues to Democrats are care/harm, liberty/oppression, and fairness/cheating, whereas for Republicans the most important issues are loyalty/betrayal, authority/subversion, and sanctity/ degradation. In this video he tells us that openness to new ideas is a characteristic of liberals, whereas conservatives prefer the familiar, which seems obvious, but sometimes the obvious needs to be scientifically certified.
Haidt espouses the current wisdom that the us-vs-them mentality (plus patriotic cohesion) derives from chronic war which set in motion what Darwin described as group selection (see below).
My only point here is that our us-them-instinct goes back maybe 100,000 years max. in comparison to our instinct for justice which has defined us as human from the very beginning 6 million yrs. ago. If not justice, what do you think is the deepest human instinct, vanity? winning?
Cause of Us-vs-Them
There can be no doubt that a tribe including many members who, from possessing in a high degree the spirit of patriotism, fidelity, obedience, courage, and sympathy, were always ready to give aid to each other and to sacrifice themselves for the common good, would be victorious over most other tribes; and this would be natural selection.
– Charles Darwin (Descent of Man, 1871, p. 166)