The Bible allows for two types of slavery, which are very common in modern Western countries today. Slavery can only be imposed upon criminals or taken up voluntarily by free persons under work contracts.
Exodus 21:16
And he that stealeth a man, and selleth him, or if he be found in his hand, he shall surely be put to death.
Kidnapping for slavery is an abomination. Exodus 21:16 prescribed the death penalty for kidnappers, referred to as "menstealers" in the KJV. Obviously the famous colonial slavery, where slaves were kidnapped from Africa, was an abomination under Exodus 21:16. It is also illegal to knowingly possess what is stolen by someone else.
Biblical slavery required the prospective slave to voluntarily sell themselves to slavery. That kind of slavery is actually very common in our modern capitalist world. Once the contract for slavery was completed, the slave would become a "free man".
With Biblical cases of people captured for slavery, if we call that kidnapping, then modern police officers are also kidnappers. Cases like that involved prisoners that were arrested by the Hebrew "police officers" of God, under His laws for the ancient state of Israel. Those prisoners had broken the laws of the creator of Earth. Some were executed and others were arrested and ended up as convicts under prison labor. That kind of slavery for criminals is also very common with many countries today.
Before people ridicule God for slavery, they should consider that in the proper context, Biblical types of slavery are very common in the modern Western world. God will return soon to rule from Jerusalem and those that break His laws will face His terrifying consequences, repent and be born again today!
You might also like:
Why you cannot repent in Hell