Even in the most basic definition of a group, [social psychologist Henri] Tajfel and his colleagues found evidence of ingroup bias: a preference for or privileging of the ingroup over the outgroup. In every conceivable iteration of this experiment, people privileged the group to which they had been randomly assigned. Ingroup bias emerged even when Billig and Tajfel in 1973 explicitly told respondents that they had been randomly assigned to two groups, because it was “easier this way.” The ingroup bias still appeared, simply because the experimenters distinguished the two groups. These respondents were not fighting for tangible self-interest, the money they allocated went to other people, not themselves. They simply felt psychologically motivated to privilege members of their own imaginary and ephemeral group—a group of people they had never met and would never meet, and whose existence they had only learned of minutes earlier. People react powerfully when they worry about losing group status, even when the group is “minimal.”
Uncivil Agreement: How Politics Became Our Identity. University of Chicago Press, 2018. p. 11
This idea is also explored in the book called “The Coddling of the American Mind.”