Slavery is no more endorsed in Scripture because there are regulations concerning it any more than divorce is endorsed because God has regulations concerning it.
Agreed the regulations are no more than protections in any case.
The one or two divorce regulations to protect the innocent party. The Bible still says God hates divorce.