Religion and racism compliment and encourage each other like companion plants. The same thing could be said about religion and sexism. Jeremiah Camara speaks about the religious roots of racism.
In general, religion is in the business of selling fear. Fear is what puts butts on the benches and bucks in the buckets.
I’m not sure that they really care if they are instilling fear of sex, Jews, Moslems, Christians, women, blacks/whites/reds/yellows as (in)appropriate, other countries, atheists, or anything else.
To quote Yoda, fear leads to hate, hate leads to anger, and anger leads to the dark side. I.e. money to the leader.
Most people fear those who are not like them. If you skin color seems to be the race that controls power in your area you are likely to agree with that group and be against the others in some way. White supremacy can easily take over if there is a white majority. It's important to remember that when the Europeans came to America they brought disease that was new to this continent. The invaders knew they were superior to the natives because the natives got sick and died. Nothing of science as we know it today was known. Variants of that idea still exist. The illusion is that you are better than "them." We are surrounded daily by ideas of "being better than them" and the ideas go deeper than sports. Religion and racism promote these ideas.
While I support your sentiment, I respectfully disagree with this commonly accepted belief.
Most people fear what they have been taught to be feared... That generally is the unknown but humans are plenty capable of not fearing what they do not know.
We need to start using words like "primitive" where it is appropriate and in this case, necessary
Religion and racism go together like peanut butter and jelly.