It is fitting that the Lord begins his rules in the Law with slavery and then murder. He wants Israel not to be like Egypt, a nation that brutally enslaves and murders, but like himself, a God who protects human dignity and life. That’s the main point of chapter 21. God’s people must preserve dignity and life as God does.
Given how lowly people viewed slaves, it’s remarkable how God’s Law begins speaking to this issue. By introducing his Law with remarks about slaves, God reminds his people that he is a God who hears the cry of those oppressed by slavery. He rescued them from slavery. He begins with laws about slavery to bring glory to himself before Israel in reminding them of his great act of redemption. And he begins with slavery so that Israel’s own treatment of slaves will be Yahweh-like rather than Egypt like. Similarly, with the laws about murder, we recall Egypt’s blood-thirsty murder of the Hebrews.The point of ch 21 is this: God’s people must preserve dignity and life as God does.