The Bible is criticized for allowing for slavery. But slavery in Scripture was strictly voluntary. It is a fact that many people have a slave mentality. They can not or would rather not cope with the responsibilities of a free life. This is not a moral failure or sin but a fact of life.
Trying to force such people to be free simply prompts them to look for other ways to avoid responsibility and freedom. A popular and easy choice is socialism where those who cater to the slave mentality are put in charge of the free people as well.
Having slaves in charge is a curse and happens when free men forsake Biblical Law.