Unbelievers often mock Scripture because of the instructions about how to manage slavery. Slavery has always existed and continues to exist world wide today. For example prisoners in the county jail are forced to mop the floors, wash the dishes, collect trash along the roads, etc. They are, in fact, slaves for the duration of their sentence. What God gives in Torah are rules to prevent unnecessarily harsh conditions for those who are enslaved.