I'm pretty sure discrimination of the Other is just a specialized form of selfishness. We see it everywhere from common daily racism to nationalism to immigration policies. "It's mine, and I'll share it with x, but I won't share it with y."
Group identity is a lie.