Tolerance of outsiders is also a human instinct

“Like many social animals, including several primate species, and also dolphins and elephants, we humans live in what are known as ‘fission-fusion’ societies – our allegiances are flexible; there is a fluidity in the size of groups into which we coalesce; and the boundaries between our groups or tribes are porous, depending on the circumstances. For instance, when food is abundant, individual members of fission-fusion species will temporarily dissolve their smaller formal groups and intermingle en masse. In contrast, when food is scarce, individuals will split into rival groups to search for food in different locations.”