This really is the key: the manner reveals the motivation and morality is about motivations, which makes it understandable why slavery existed in the ancient world.
Suppose your country is invaded by a belligerent neighbour one summer and you manage to fend off the attack and capture most of the enemy soldiers.
What do you do with them afterwards:
(1) let them go, (2) kill them, (3) cut off their right thumbs and release them, (4) make them your slaves?
The obvious problem with (1) is that if you let them go they may return next year and succeed in the job of murdering you and destroying your nation or tribe. (2) and (3) are fairly cruel and barbaric.
Which leaves (4).