When you go beyond that and ask what it is, you're entering into general ignorance. We know there's something about human nature that forces us to grow arms, not wings, and undergo puberty at roughly a certain age. And by now we know that acquisition of language, growth of the visual system and so on, are part of human nature in fundamental respects. When you get to cultural patterns, belief systems and the like, the guess of the next guy you meet at the bus stop is about as good as that of the best scientist. Nobody knows anything.
People can rant about it if they like, but they basically know almost nothing.
In this particular area we can at best make some reasonable speculations. I think the one I've outlined may be a reasonable guess. It's not so much that racism is in our genes. What is in our genes is the need for protecting our self-image. It's probably in our nature to find a way to recast anything that we do in some way that makes it possible for us to live with it.