It's not necessarily something people consciously think about, but never forget that at the beginning we are beings trying to keep our group alive and going into the future. Evolutionnary thought leads us to these techniques of preservation : that's why even the most open-minded people will often still marry/conceive life within their own group. I would argue that racism and xenophobia is also a "defense mechanism" againt "the other", remember that in olden days that "other" might invade you and wipe out your people. Black people (and, in general, non-White people) far outnumber White people, and that has ALWAYS been the case, and will always be. Here's the thing : when you mix White and another colour, the child will most likely more look like "the other" than White : so interacial procreation looks like the dwindling of the "white" group.
Culturally, it is also important to understand that White people are the ones who have the most lost their own "identity", meaning traditions, local dialects, foods, etc...all in the name of modernity. That's why they hardly ever are neutral towards people who still have those traditions : either they admire them and want to copy them (the whole white girl who wants dreads thing for example, or the whole copying of Black culture in general) or want to destroy it because it's "deviant", "retarded", etc. in French "traditionnel" can have a positive sense, but more often than not I would argue that it has a negative connotation, as in "backwards". That's why Colonizators were always destroying whatever trace of local civilisations they could. I know many white people who feel culturally lost because they don't really have any traditions any more, and are in awe of those of who. That's why you see rich white kids copying the talk and style of Arab and African immigrants in Europe. Me thinks that they are jealous of them. I would argue it also explains the rise of regionalist and separatist parties in Europe who want to revive their "true" essence and who more often than not have a strong cultural aspect. Remember that all the various empires in Europe led to uniformization, which many people hate (one of the reasons some people are against the EU). Hell French only became the official language of France because the central power of Paris violently imposed it upon various regions (hence distrust to this day from Bretagne, for example).
When talking about white racism, one must also always keep in mind the particular situation of Europe : it's a very small "continent", which means that as opposed to other ones the various ethnic groups had less space to call "theirs" and would constantly come in contact, and competition, with each other, whereas for example in Africa different groups could trade with each other, and each would go back to their place knowing there's enough space for everyone. Yes you would have wars, but I don't believe to the same extent as in Europe. In Europe there's never been enough space for everyone, hence centuries and centuries of wars and, yes, genocide. All these wars and mass killings have led to deep distrust between Europeans, something that remains until this day to an extent (see the constant french-bashing by the English, or the Anti-German sentiment that was present way before WW1). That distrust has then led to racism and xenophobia : Italians, Portuguese or Spaniards were the ones facing mad xenophobia until like the late 60s. A lot of Dutch-speaking Belgians HATE Dutch people. Everyone kind of hates French people (people often forget to consider Napoleon's wars and the impact it has on lingering anti-French sentiments). So you already had all this hate/racism/xenophobia IN Europe.
Now add to that the fact that Europe is right next to Africa and the Arab world, both bigger and more numerous: it was in contact with "other" people quite easily, which is good but can be considered a threat by some. And add to that the fact that Europeans, having such a small continent with so few natural ressources had to find a way to expand : they were basically pushed towards the sea (no surprise that one of the smallest countries, the Netherlands, became one of the biggest maritime forces ever. Hell th ecountry itself was taken from the sea), and thus almost forced to go and discover other continents : more "others", more racism. It's not that Arab, African, Chinese empires didn't have the faculty to develop sea dominance, but they didn't have the need to do so. So they met less "others", which led to less "grounds" for racism (racism is not only ignorance, but also finding ways to "justify" killing others).
That's why I think the whole "recessive gene" thing makes thing. These things pass from one generation to the other, without people being conscious about it. Sorry for the long post which might be all over the place but I hardly slept this night
This shyt is so. fukking. interesting.
History always repeats itself. If we want to get out of this lump we're in, our best bet is to study history and see how others gained power.