Humans are not logical creatures with feelings. We are emotional animals with the ability to rationalize. Forget your fantasies and focus on reality. Racism is a core part of what makes humans human, and those who lack it will be replaced by those who do.
Sure, we aren't robots (thankfully) but if you're not indoctrinated in a vulnerable phase when your mind is still in formation, that is, during childhood, you probably won't blow yourself up because a fantasy book says that you'll get 7 (77?) virgins at your disposal if you kill "infidels".
From a group-competitive perspective, it makes perfect sense. One of theirs for a dozen or more of ours is a good deal, evolutionary speaking.
The pivotal point is the creation of killers through indoctrination. There are many groups who can coexist peacefully: Harry Potter fans, "beliebers", even bitcoiners (actually for the last one I have some doubts) and they do no harm. They are welcome to expand their member base as they please. The issue is when you have to confront brainwashed fundamentalists, and you can solve the problem only by sparing the younglings the same treatment.
Harry Potter fans are no threat to anyone. Ethnic groups, however...
The world has limited resources, whatever the masses want to believe. Humans have always competed, group to group, and that won't change. It's hardcoded on a genetic level. The only thing that changes is the precise form it takes. And this is the root of racism. Without racism it would not be possible to kill another people, but it would still be very possible to be killed. And so racism is a trait of evolutionary winners. And the immigrants are very, very racist. If we don't fight back, we will die out.