To illustrate the built-in tribalism and its consequences, you need only to look at the new and unfortunate nation of South Sudan. The newly elected President and Vice President decided they no longer wanted to work together, and they got the two largest tribes, the Dinka and the Nuer, to go to war over it. The result has been really horrible genocide.
Neither of these idiots could have been able to create this war without the built-in tribalism they were able to exploit. At the moment, the President is getting the most opprobrium for encouraging the rape of women and girls as a payoff for his soldiers. I suspect this has been going on all along.
If racism is not hard-wired, it is an available subroutine that can be called from the main program by using the right sequence of codes.