The Bible is criticized for allowing slavery, and for not condemning it. At best, it’s seen to be a reflection of the morals of its time, at worst, actively evil. But it is a mistake to view the institution allowed in the Bible as equivalent to the slavery of Africans in American history. The slavery in the Bible is more like a form of indentured servitude. Such an arrangement would allow a poor man to survive. While not ideal, in an era before government welfare programs, slavery would be preferable to death, especially when some forms were more equivalent to modern-day employment than what we think of as slavery.
We also see the rank hypocrisy of atheistic attacks on the Bible. Slavery was an evil that occurred on all inhabited continents, and all races have practised it and been its victims (the word comes from a heavily enslaved “white” race, the Slavs). It was finally abolished only by evangelical Christians in the West using explicit biblical reasoning. Yet who do the antitheists single out for the evil of slavery? The Christian West!