The first part of Exodus 21 has to do with laws pertaining to the treatment of servants. I find it interesting that Israel had just left Egypt where they were under brutal servitude and now they are their own masters and have become masters of other servants themselves. I don’t think it’s any coincidence that this is the first set of moral judgments that God gives to them.