Europeans, arrogant and greedy for progress around the time of the Industrial Revolution, needed labour for the New Territories. With Church complicity, slavery provided the answer and Africans in particular were shipped off to America as chattel.
Treated as less than human, they were bought and sold by their white owners and despite official condemnation of slavery by several popes; some were even bought and owned by the Church.
Racist pillars of the Church
Churchmen could find sufficient justification in the Bible to own slaves. In Gen. 9:25 we read Noah's curse on his son Ham and all of Ham's descendants: "A servant of servants shall he be unto his brethren." Theologians understood that Ham was the very first ancestor of black Africans, and Noah's curse became justification for Europe, and later for America (North and South), to enslave black Africans. The same Biblical sanction was used as an excuse for racial segregation.
And yet, that part of the Bible shows we are descendants of the same original family and therefore in no way "less than human". (Interestingly the word 'black' stems from the Proto-Indo-European bhleg-, meaning 'burn' or 'scorch'. The same root produced 'bleach', 'bright' and 'white'.) We all share the same ancestors and come from the same first seed.
Gen. 9:25 mentioned above could, of course, be interpreted in the opposite direction; that Ham was the white man and his brothers were black. But black enslavement suited the Europeans, so that was that.
The Bible indicates that Ham had sinned by having an incestuous relationship with Noah's wife, and hence cursed by Noah. Well, it's understandable that Noah was a bit miffed, but on a point of law, this happened before incest was a sin (Lev. 18 and 20).
In 1865 when slavery was abolished in the United States, many blacks were freed and wanted to participate in white churches. But although slavery officially ended, racism was still very strong. If a white church accepted former slaves into the congregation, they were either told to sit or stand at the back.
In many cases, they were refused permission to enter the church at all, so they founded their own churches, involuntarily enforcing segregation and self-subjugation.
Until 1967, anti-miscegenation laws prevented interracial marriage in several American states. It wasn't until 1978 that Mormon Church doctrine stopped segregating blacks and even today, many other individual churches continue to bow to their bigoted leaders.
Racism outside religion
'White' means 'morally pure'. A 'white lie' is not really a lie and a 'white-collar worker' is superior. 'Black' is dirty. Wool from a black sheep cannot be dyed and consequently worthless. Black magic and the black arts draw on malevolent powers. Nobody wants to be blackmailed or blacklisted for working on the black market. Black widow spiders are not so friendly and that thing which never lets you escape from the office, the infernal Blackberry.
And yet a white feather is a symbol of cowardice and 'to whitewash' is to hide one's mistake. A 'white elephant' is something that's a waste of time, effort or money. And talking of money, if your account is in the black then that's pretty good.
In other words, the issue is not so black and white. The world is an interweaving mixture of all shades. Fair-skinned people trying to get a sun-tan pay about as much on ointment as dark-skinned people pay trying to lighten their skin. Peddlers of both darkening and lightening treatments claim their products will improve appearance.
Racism even before religions began
The reason for racism in society is easy to understand.
Since the time of earliest man, defence of his property, territory and family would be of paramount importance. Any other person in the vicinity would be competition and threat to the survival of the man and his family.
People from another settlement or tribe would be an even bigger threat, because their intentions would be unknown.
People from another race would be the biggest threat, simply because they are furthest from the family. And if the language or skin colour differed, then this would just compound the fear.
Racism and Christianity today
Today we are a little bit more enlightened. We realise that people of other countries, colours and cultures are people of the same human race, and that cooperation is mutually beneficial.
We still harbour some of the survivalist fears that threatened our ancestors, but generally racism is recognised by all sane people as illogical, and by the Church as sinful. Racism elevates and exalts the superiority of one's own race and therefore becomes idolatry, which is something else Christians are supposed to avoid.
Today's racism is a legacy from the days of black African slavery, based on a misunderstanding of Gen. 9. In the past, most Christians never read Genesis to the point that they fully understood what the Bible was saying. And they didn't need to read it; the Church did the thinking for them.
Corporately, churches have made and continue to make reparations and issue apologies. But of course, money cannot fix all injustices. And money certainly cannot pay for the sin. Only love can do that.
There is an ominous resurgence of slavery in the 21st century, and the victims quite probably outnumber those of the 17th and 18th centuries. One way to repair the past is for the Church, and its members, to work toward abolishing today's version of slavery.
If we don't, then we are like Noah; cursing our descendants to generations of future racism.