The Israelites practiced something more like debt bondage than the chattel slavery seen under the Egyptians, or in the Roman Empire and the American south. Like many of the injunctions, such restrictions were “case law” that was designed to regulate and mitigate the practices of those “whose hearts were hardened,” as are all men, but whose social customs were still far and above any of the other people of the era. Think of them like OSHA regulations covering practices like work in asbestos factories or child labor. The existence of the regulations does not mean the government wants people to work in unhealthy occupations or that children should have to work to help support their families, but it recognizes that people will do such things, often out of necessity, and so it strives to reduce the impact of such customs on people.
We know of no culture in ancient times that did not practice some form of slavery. That the Jewish version was so mild, and was designed to prevent people from having to resort to it to stay alive, tells us about the difference between the Jews and all their neighboring people. Even under a system such as debt bondage (basically the same system my Irish ancestors were under when shipped to the New World), in which people who had no other means sold themselves as collateral, the indentured servants (whether Israelite or foreign) enjoyed protections far beyond what any other people granted their slaves.
As Paul Copan has written,
Old Testament legislation sought to prevent voluntary debt-servitude. A good deal of Mosaic legislation was given to protect the poor from even temporary indentured service. The poor were given opportunities to glean the edges of fields or pick lingering fruit on trees after their fellow Israelites harvested the land (Lev. 19:9–10; 23:22; Deut. 24:20–21). Also, fellow Israelites were commanded to lend freely to the poor (Deut. 15:7–8), who weren’t to be charged interest (Exod. 22:25; Lev. 25:36–37). And if the poor couldn’t afford high-end sacrificial animals, they could sacrifice smaller, less-expensive ones (Lev. 5:7, 11). Also, debts were to be automatically canceled every seven years. In fact, when debt-servants were released, they were to be generously provided for without a “grudging heart” (Deut. 15:10 NIV). The bottom line: God didn’t want there to be any poverty in Israel (Deut. 15:4). Therefore, servant laws existed to help the poor, not harm them or keep them down.
Copan, Paul (2011-01-01). Is God a Moral Monster?: Making Sense of the Old Testament God (Kindle Locations 2617-2624). Baker Publishing Group. Kindle Edition.
If a person was forced into debt bondage by circumstances, they were granted rights by divine decree that protected them. They could not be physically abused, and had to be released if injured by their master. If they were killed by a master, the master was to be put to death (quite different from the Roman Law and the Code of Hammurabi, under which a slave owner could generally rape, beat, maim or kill slaves with impunity.). They were considered as persons, not property (Gen. 1:26–27; Job 31:13–15; Deut. 15:1–18), and retained their human dignity.
Slave-trading – kidnapping a person against their will to keep or sell as a slave, was forbidden under penalty of death: “He who kidnaps a man, whether he sells him or he is found in his possession, shall surely be put to death.” (Exodus 21:16). St. Paul and St. John also later condemned slave traders in no uncertain terms. (As did St. Patrick and St. Augustine.)
The Israelites were required by Mosaic Law to help and shelter foreign runaway slaves (Deut. 23:15-16) – unlike other ancient cultures, or the American example, where it was a felony to help a fugitive slave.
It was not a perfect or a perfectly just system (no institution run by humans probably can be), and there were obvious inequities by modern standards, but it was superior to any other system of its time, and certainly to the American experience of slavery.
Jesus said such practices, as the old Mosaic laws on divorce, were against what God wanted for His people, but were permitted in olden times because His people’s hearts were hardened, before establishing a new law. Jesus denounced slavery as practiced under the Roman Empire, as he did every form of oppression: Citing Isaiah 61:1, Jesus clearly said His mission was “to proclaim release to the captives, . . . to set free those who are oppressed” (Luke 4:18).