Andreas Hoffer has written in Medium about his analysis of these matters. According to him, all people's DNA can be traced back to being a pastoralist, a forager (hunter/gatherer), or a farmer. That determines what kind of society a person will favor. Politically, 'tribes' are people of a like mind about the kind of society they want.
Europe (therefore the U.S. and other nations formed by people of European heritage) is dominated by farmer-types who want a society with order and stability above all else. Any cultural type that represents a threat to that--for example, people of African heritage, lacking a lot of farmer types--will be denied access to power in a society dominated by farmer types.
That is not an excuse for racism. Human beings are not mere slaves to our DNA. We can recognize right/wrong and justice/injustice. Racism is wrong/injustice.
Still, Hoffer's analytical paradigm does offer at least a partial explanation for the existence of racism (and classism, for that matter). Explaining racism's existence can be a first step towards eradicating it.