In their book "In the servitude of power: energy and civilization through the ages”, Debeir, Deleage and Hemery point out that slavery was the rational energy system.
"Under normal conditions, the efficiency of the human convener is about 20 per cent meaning that no more than 500 to 600 kilocalories will be available for reinvestment in social activities in the form of useful mechanical energy. It is clear then, that if human beings could tap only the endosomatic flow, they would have only very little useful energy to reinvest in durable production. Nevertheless, and this is a very important point, the efficiency of the human-machine is the highest of the animal kingdom. That of the horse, for example, which had a major role in past energy systems, scarcely rises above ten per cent and that of the ox is still lower. From the standpoint of energy, the use of draught animals is therefore a luxury. It will now be understood why, for centuries, the human converter was the most desirable. In historical circumstances where exosomatic organs [= machines] are underdeveloped, slavery is a more rational energy system.”
Slavery made perfect sense energy wise. It's why it was universally independently invented and applied! It took the rise of the era of abundance of cheap energy - fossil fuels - to end this economical rational. As usual, the societal morals adjusted accordingly.