There are some things that are morally wrong. There is no gray area, they are just wrong. Rape, murder, torture, and many other forms of abuse fall into this category. We may argue about what constitutes "torture" or when someone has actually committed murder, as opposed to justifiable homicide, but once we have determined than an act falls into one of these categories we all recognize that it is wrong. In English we use the term "inhumane" to describe these kinds of things, because we understand, from a primal level, that it is wrong to do these things to other humans.
But, what do we do when we come across an act that seems to fit into this categorization, and yet is permitted, even regulated by God? That is to say, what would we do if we found a section of Scripture that said it is okay to rape a woman under certain circumstances, or that it is okay to torture someone under specific conditions? We don't find those kinds of passages in Scripture, do we? Is God so immoral that he allows inhuman acts to be committed by his people, and does not call these acts sin? If not, then we have to have an answer for slavery in the Bible, both the Old Testament and the New.
Before we can discuss slavery in the Old Testament we have to address a certain psychological problem we have in the West today. When I say the word "slavery" or think about the term, the pictures, the ideas, that come to my mind are the horrible images of the African slave trade. The facts of history are that millions of men, women, and children, were forcibly taken from their homelands in Africa and then sold, by other Africans, into slavery. They were purchased like property by people in Europe and the New World (and even in India and the East), and were treated horribly.
The justifications for treating people like this was that they were less than human. The rise of Darwinian evolution in the 19th century, as an example, allowed white Europeans to say that black Africans (or any other race for that matter) were less than themselves. This same racist, vile attitude still persists today in various forms. The sad reality is that we are sinners by nature, we dehumanize, devalue, and desacralize others all the time. This is part of our curse, as we seek to flee from God we deny his image in man, for that image is the constant reminder of our rebellion against him.
This form of slavery, though, was not the slavery of the Old Testament. In fact, the Old Testament explicitly called for those who practiced this form of slavery to be put to death. Exodus 21:16 specifically says that any man who steals a man, and any one who is found in possession of a man who has been stolen, shall be executed. What is being taught here is that if you kidnap and sell someone, then you forfeit your life. Slavery in the Old Testament did not allow for the kind of dehumanizing man-stealing that modern slavery employed.
So what was slavery in the Old Testament? First of all, slavery was a method for the poor to find provision. Again, look to Exodus 21. The first law we see is an admonition about buying Hebrew slaves. Since these could not be captives in war (since Israel wasn't supposed to go to war against Israel) and these couldn't be men stolen and sold into slavery, how did they become slaves? In hard economic times if a man lost everything he had, his home, his fields, his animals, and had no way to pay his own debts, then he could sell himself into slavery as a means to have provision.
If a man knew that he could not afford to pay back the debts he had incurred, then he could sell himself to someone else, a wealthy person in the area, who would then put him to work as a slave. In this situation the slave was still a paid man, but he received less than a hired hand, and he did not have the same freedom as someone who simply hired himself out for labor. We see this in Scripture as we read Deuteronomy 15:18. Here we see the expectation that a slave would still be paid, though it would be less than a hired hand.
So, slavery was an option for the very poor. In selling oneself as a slave it meant you would have shelter, food, clothing, and after seven years you would be able to go free with money in your pocket (assuming the law was kept). For those in this situation, while slavery was not ideal, it was certainly better than the alternative of death from starvation, exposure, or thirst.
But, what about women? Immediately after reading about a man being a slave in the text we read that a woman sold in slavery is not to be set free in the same way. But notice something more in the text. The assumption is that a woman bought in slavery was being purchased as a wife. The text says if a man buys her for himself he must treat her as his wife, if he designates her for his son, then he must treat her as a daughter-in-law. The assumption of the text is that a woman bought as a slave would be introduced into a sexual relationship, and thus she must be given the rights of a wife.
Women, usually, did not have the economic opportunities or the rights that men had in the ancient world. We see this again when we look to the story of Boaz and Ruth. Ruth, as the daughter-in-law of Naomi had the right of redemption through a close relative of her deceased father-in-law, and yet it was Boaz who went to the gate and sat among the judges and requested the man fulfill his duty. Though Ruth had the right to be redeemed, because she was a woman, a man had to step in to secure that right for her, and to call the other men to acknowledge what was right.
You can complain about this social structure, and we can certainly look at the morality behind such a system, but that's another post in itself, and a separate issue. For the sake of understanding female slavery in Israel we have to recognize that a woman, separate from her family and in poverty (as she would have been if she was sold into slavery) would be in a very bad situation if she was simply turned out after seven years. Her reputation as a woman, and her future opportunities, would both be severely diminished compared to what a man would expect. Therefore a woman was not to be turned out after an allotted period of time.
But, what about the wife of the man sold into slavery? We see that the man goes free, yet his wife and children remain. Isn't the bible simply saying that masters could play a cruel game, marry off their slaves and then tell them, "You can go, but you'll never see your wife or children again." Isn't this just emotional blackmail as a means to keep slaves from seeking their freedom?
Again, look to the text. If a woman was not pleasing to her master, that is if he did not marry her himself or give her to his son, or if he found her displeasing after taking her, then he was required to allow her to be redeemed, that is purchased back. And, as the freed slave was supposed to be given wealth upon his release, he would then have the opportunity to seek to redeem his wife and children.
Consider that as an economic investment, selling the wife and children would make more sense for the master. He would have extra mouths to feed (the children wouldn't be older than about 6, at the most) and he would be getting no extra economic value from holding onto them, so it would be in his interests to let the man who was just released also have his wife and children. Otherwise the maintenance of this additional family could be an additional strain on the man's own budget. And, as the children would be Israelites, he would not be able to keep them perpetually, but would be required to set them free, as we see in Leviticus 25.
Yet again we might ask though, what if a woman was purchased just to be a slave in the house, to care for a young daughter, or do other tasks. What if there was no sexual relationship implied and no intent to marry her? What if she was sold as a girl and was still of age to return to her father's house after a time? It would seem cruel in such a situation to require a woman to be a perpetual slave.
There seems to be an exception given in the case of women who were purchased as slaves, but were not intended to be married. In Deuteronomy 15 we see that the text says that men and women are to be treated the same in regards to releasing them after 7 years. So, if a woman was purchased but was not taken as a wife, or was not forced into a sexual relationship, she would go free, just as a man would, after her seven years of service. So, the only time a female slave would be kept perpetually would be if she was married, in which case she was to be treated as a wife (or daughter, depending on who married her), and not a slave.
But, what about permanent slaves? In Leviticus 25 we see it written that the Israelites were allowed to make permanent slaves of those they defeated in battle, or those of the land around them, or even buy slaves from others who came to live with them. Isn't there inhumanity in the way God allows them to be treated as slaves forever?
In short, no. God is making a distinction between his people and the rest of the world. Notice that God says the reason that an Israelite is not to be treated as a slave like others, but rather is to be treated as a hired hand is because the Israelites are God's slaves. His point is that these other nations do not know him, they are not his people, but Israel is his, and as such they are different.
Still, a "permanent" slave was to be given the same rights as others. He was to be allowed to rest on the Sabbath, he was to celebrate the jubilee year and not plow the ground or work the fields, he was to be given his freedom if his master so wounded him as to cause permanent damage (knocking out a tooth and blinding an eye being the two examples used in Scripture). And, in the even that his master killed him he was to be avenged. Again, a radically different kind of slavery than was seen in the West, where often there were few laws regulating how a master could treat his slave.
Moreover, as slaves in the ancient world routinely accrued wealth, a slave could even purchase his own freedom. While perhaps not common, and certainly not easy, it also meant that slaves were allowed to own property of their own. Again, this is a distinction from modern slavery where slaves would be allowed no property, or could have what little they had acquired taken from them at the will of their master.
A final word is worth mentioning in regards to the attitude of those who purchased slaves. God reiterates multiple times the fact that he is the one who brought Israel out of the house of slavery. God notes that Israel is his; they are his slaves.
The biblical attitude seems to be one that should lead masters to have mercy toward their slaves. Even if the slave was a non-Israelite, it was not seen as appropriate to treat him cruelly, or abuse him. After all, what was God's attitude toward his slaves? To paraphrase C.S. Lewis, the more time we spend with God, the more we become like him, so those who were supposed to be his people and follow his law should have been continually transformed by that relationship in men of mercy and compassion, slow to anger and abounding in steadfast love to their slaves.
"Slavery" is just a word. Similarly the term "servant" is just a word. There is a denotation for these words, describing the fact that a servant and a slave are those who are bound to submit to their masters, they do what they do from obligation, because they are required to, not necessarily because they desire to do so. Yet, the connotation of "slave" that exists in our culture, and the ideas of "slavery" that exist in our culture, when read into Scripture are anachronisms. The wickedness of modern slavery is not what God permitted or regulated when he gave the righteous law to the Israelites.