The aphorism "birds of a feather flock together" describes the fact that people tend to prefer associating with others who are similar to themselves. The phenomenon goes by different names: Sociologists call it homophily, psychologists call it in-group favoritism and political scientists call it affective polarization. It's observed in a wide range of demographic and social characteristics including sex, race, religion, age, education and political party.