We also read here that if you brother is destitute and is sold to you, you should not work him with slave labor (degrading work).
And he shall live with you until the Jubilee year.
I was interested to read that we don't do the Jubilee year anymore because we are no longer the twelve tribes that live in the land of Israel.
It is somewhat surprising after Jews were slaves in Egypt that they would take slaves when they could. Perhaps they had some edicts about treating the slaves well...or at least better than they were treated in Egypt. It suggests here that the slaves were to work with rigor, because we hear that one's brother (should he be bought by you because he is destitute) should not be worked like that.