tribalism, Us vs. Them, racism, patriotism/nationalism, etc all seem closely related.
In terms of social life, and romantic life, it's interesting how heavily we rely on shared/common background, which tends to cause this clustering effect.