Jonathan AC Brown over in Georgetown got himself in trouble a few years back, which even a complaisant media couldn't quite get him out of. The question put to him - which he'd tried to ban hostile audiences from hearing - was whether slavery is all that bad. Technically Georgetown sits below the Mason-Dixon Line, where certain people might get sore about the topic...
Brown was a convert to Islam at the time (I assume he still is), so that faith-system was colouring his opinions. Recall that the whole of Islam is just a late-antique take on west-Syrian Judaism and Christianity. So I'll be discussing here how we got from the Neolithic to Jonathan AC Brown.
"Slavery" in our language comes from an Islamic and Byzantine term: the concept of an alien tribe, dragged into the empire to do the empire's dirty work. For them in the eighth century AD, those aliens were often Slavs. But the Sclovenes are not noted in the Quran; races as such are rare there, beyond "Ishmael", "Jews", and "Arabs" (and there's long been debate about the Qaric understanding of these terms). The Quran instead has the concept of 'abd, the "servitor". The same word is in Hebrew. Are they the same thing?
When you get back to the Hebrew Bible, and very-probably the earliest suwar of the Quran, there's no concept of the chattel race at all. The Torah legislates the 'obed as an indenture: Mr 'Obed was set upon a six-year term, and his master would care for Mr 'Obed until the term was up. 'Obed might well decide he liked his master, at which point he might apply to join the household. Although the Quran does not repeat this legislation (there is, famously, not even Sabbath in it) we do find allusions to the general sentiment. The wala', that post-slavery clientage, was VITAL to early Islamic history.
Sex servitude existed as well. This servitude is the worst sort, in my opinion. This post will deal with that, some; but my angle is more "Marxian", if you like, dealing more with the economics, where (second-worst) chattel racial slavery is most salient.
Slavery as such was impossible at the scale of the early Hebrew kingdom. The great empires, like Egypt and Babylon, did have need for large-scale work; but that work was project-based: building this pyramid, or that road. This tended to be ad-hoc. It could be done with a corvée, or with prisoners taken in a raid, after which the people just... melted back into the local villages. Even foreigners likely had taken up with the local women and would settle near where they were at.
So: what changed?
I had the theory that monocrops changed. Olive plantations in Spain; quarries around the Med; and of course sugar in the Sasanian Iraq. Suddenly there was rough work to be done in the same place over generations. Indenture wouldn't cut it in cane-country (so to speak), and the Marsh Arabs sure didn't want to do it. So along came what the Bible's authors would have hated: the importation of many thousands of blacks from East Africa, and Slavs from Europe. These attended an imperial-scale economy.
With the rise of empires and cash-crops, came apologists for permanent chattel. Among the Greeks, Aristotle argued that Anatolians - "Asians" - were unfit for liberty.
At the same time, polyglot multicultural empires diffused authority to subject peoples. So more-egalitarian voices sprung up. Sometimes we hear from Alcidamas. The Christian baptismal formula we read in Paul assumes that, in what truly matters, which is Christ, race and slavery is irrelevant. Later the Christian cleric Gregory of Nyssa was blunter: he thought very low of slavemasters.
Dennis Prager's commentary on Exodus proposes that book as a reaction against Near Eastern assumptions, large-scale impersonal servitude being one. Prager (if I'm reading him right) argues that if all peoples had heeded the Torah, servitude would never have evolved into true chattel slavery. He could be right... except that Genesis had already nodded to genetic servitude in "The Curse Of Ham".
Also, the world-religions, like Hellenism, Zoroastrianism, and then Christianity and Islam, offered a loophole: what of those who don't adhere to the religion? They can take slaves from the heathens, and those slaves "deserve it". (Judaism is not blameless; the Jew might not keep a slave, but he could trade in one.) The Quran is worst: over and over it speaks of infidels' sufferings on earth as a mere taste of what awaits them in Gehenna. (And it legitimises rape.)
I am Christian myself. I will admit the Bible's imperfections; and I observe how these imperfections have led to evils, in this case The Curse Of Ham and sex-servitude both. But if you'll allow me, I suggest that the overall Christian message, which follows the Jews' message, should not permit (true) slavery; it should also ban sexual servitude. I find otherwise from the core Islamic texts, which start by abrogating both Torah and Christ.
BACKDATING 8/31 1 PM MST - to the time when I was wrestling this point over in 4chan.
PHARAOH 10/17/2020 - Janissaries don't count.