There are many difficulties in life. Sometimes people accumulate debt; sometimes people steal; sometimes people cannot manage to care for themselves. In Israel, a person could become an indentured slave for all of these reasons. The period of servitude could be for seven years or for life. Slavery as practiced under Israel's law was a far different institution from slavery as practiced in places like the United States. 

God gives several laws pertaining to servants in Exodus 21:2-11. The Amplified Bible translation offers a clear meaning of these verses. "If you buy a Hebrew servant (as the result of debt or theft), he shall serve six years, and in the seventh he shall go out free, paying nothing. (Lev. 25:39.) If he came (to you) by himself, he shall go out by himself; if he came married, then his wife shall go out with him. If his master has given him a wife and she has borne him sons or daughters, the wife and her children shall be her master's, and he shall go out (of your service) alone. But if the servant shall plainly say, I love my master, my wife, and my children; I will not go free, then…he shall serve him for life. If a man sells his daughter to be a maidservant or bondwoman, she shall not go out (in six years) as menservants do. If she does not please her master who has not espoused her to himself, he shall let her be redeemed. To sell her to a foreign people he shall have no power, for he has dealt faithlessly with her. And if he espouses her to his son, he shall deal with her as with a daughter. If he marries again, her food, clothing, and privilege as a wife shall he not diminish. And if he does not do these three things for her, then shall she go out free, without payment of money." (See also verses 20, 21, 26, 27, and 32)

Additionally, the Law specified slaves were to be treated humanely. Owners were to permit slaves were to rest on the Sabbath (Deut. 5:14). A slave was considered part of a Levite's household and was permitted to eat of their food (Lev. 22:11).  If a slave were to be mistreated (lose an eye or a tooth), he was to be freed (Exo. 21:25, 26).  Essentially, when a man purchased another man, the slave was to be treated fairly and cared for. That man's welfare was now the owner's responsibility. It was never part of God's law that people should be hurt. Slaves were thankful for the care of a good master. (See Ruth 2:4)

The fact that men have brutalized other men was never a part of God's arrangements. 

For more details on the subject please click on the link below