Slavery has been practiced since the early days of civilization. It was not always a racial or racist thing. Although it often was simply because the people who were enslaved were as often as not the people who lost the last war and wars were often fought between people of different ethnic or religious groups.
The "great" civilizations of ancient Europe, the Greeks and Romans, the people whose culture evolved to dominate most of the planet, kept slaves of every race and color. The Greeks would even enslave other Greeks if they conquered them in a rebellion or a civil war.
Since those days, the European nations have always kept sub-Saharan Africa down. To them it was a source of natural resources, tribal art, and cheap labor. The last thing they wanted was for a strong nation to arise in Africa, to become as modern as they were, and become a new player in the arena of international power. Persia, Egypt, India, China, the Incas and Aztecs, and eventually the Turks were quite enough competition without allowing ancient Zimbabwe to take its place as a World Power.
Ultimately the enslavement of black Africans became an economic phenomenon. Their own leaders, as well as helpful Arab merchants, found Africa to be ideally located as a source of cheap involuntary laborers that they could sell at a huge profit to Europeans, and as the practice fell out of favor there but blossomed here, to Americans.
I'm not saying that racism played no part in the slavery phenomenon, but so did economics and plain old fate with the helping hand of geography. If Americans had not gotten used to having black Africans and their descendants around as slaves, it might not have been quite so easy for their own descendants to regard them as second-class citizens.
Synchronicity.
BTW, during the era when slavery was practiced in the USA, the Arab nations of north Africa were busily enslaving Europeans and other white people. The Barbary pirates would attack ships at sea and not only steal their goods, but sell the passengers and crew into slavery in places like Tunisia and Morocco. There's no contest of numbers of course, there were about a million white slaves in north Africa and probably a hundred million black slaves spread around the planet. But it is sobering as well as ironic to realize that at the time of our own Civil War, there were white slaves in Africa.