Where all this came from is not definitely known, but as we've mentioned many times Exodus was written down in the 6th Century BCE. The so-called Covenant Code we are now reading resembles the Code of Hammurabi, and other legal systems of the region in the first Millennium. The general idea seems to be that the Covenant Code of Exodus was created by adding instructions regarding worship to the more general Canaanite legal system. The authors of Exodus set it at this point in the story to embed it securely in God's covenant with the Israelites. Anyway, here's Chapter 22. Unfortunately, the text of the RSV that I find on-line is garbled at the beginning. It omits some material and transposes verse 4.
[a] When someone steals an ox or a sheep, and slaughters it or sells it, the thief shall pay five oxen for an ox, and four sheep for a sheep.[b] The thief shall make restitution, but if unable to do so, shall be sold for the theft. 4 When the animal, whether ox or donkey or sheep, is found alive in the thief’s possession, the thief shall pay double.
2 [c] If a thief is found breaking in, and is beaten to death, no bloodguilt is incurred; 3 but if it happens after sunrise, bloodguilt is incurred.Here is the New International Version text which is much clearer.
2 “If a thief is caught breaking in at night and is struck a fatal blow, the defender is not guilty of bloodshed; 3 but if it happens after sunrise, the defender is guilty of bloodshed.So if somebody breaks into your house at night, you can beat him to death. But if he breaks in during the day, and you kill him, you are guilty of murder. Why the distinction? Who knows. If a rich man steals, he can pay a fine and it's okay. If a poor man steals, he will be sold into slavery.
“Anyone who steals must certainly make restitution, but if they have nothing, they must be sold to pay for their theft. 4 If the stolen animal is found alive in their possession—whether ox or donkey or sheep—they must pay back double.
5 When someone causes a field or vineyard to be grazed over, or lets livestock loose to graze in someone else’s field, restitution shall be made from the best in the owner’s field or vineyard.Basically, if you boink a version, you have to pay her father for depreciating her price.
6 When fire breaks out and catches in thorns so that the stacked grain or the standing grain or the field is consumed, the one who started the fire shall make full restitution.
7 When someone delivers to a neighbor money or goods for safekeeping, and they are stolen from the neighbor’s house, then the thief, if caught, shall pay double. 8 If the thief is not caught, the owner of the house shall be brought before God,[d] to determine whether or not the owner had laid hands on the neighbor’s goods.
9 In any case of disputed ownership involving ox, donkey, sheep, clothing, or any other loss, of which one party says, “This is mine,” the case of both parties shall come before God;[e] the one whom God condemns[f] shall pay double to the other.
10 When someone delivers to another a donkey, ox, sheep, or any other animal for safekeeping, and it dies or is injured or is carried off, without anyone seeing it, 11 an oath before the Lord shall decide between the two of them that the one has not laid hands on the property of the other; the owner shall accept the oath, and no restitution shall be made. 12 But if it was stolen, restitution shall be made to its owner. 13 If it was mangled by beasts, let it be brought as evidence; restitution shall not be made for the mangled remains.
14 When someone borrows an animal from another and it is injured or dies, the owner not being present, full restitution shall be made. 15 If the owner was present, there shall be no restitution; if it was hired, only the hiring fee is due.
16 When a man seduces a virgin who is not engaged to be married, and lies with her, he shall give the bride-price for her and make her his wife. 17 But if her father refuses to give her to him, he shall pay an amount equal to the bride-price for virgins.
18 You shall not permit a female sorcerer to live.Sort of conflicts with Do Not Kill. We all know the consequences of this throughout history. KJV of course uses the word "witch." The idea of a woman with agency and power is intolerable.
19 Whoever lies with an animal shall be put to death.Seems a bit extreme.
20 Whoever sacrifices to any god, other than the Lord alone, shall be devoted to destruction.Tell it to Donald J. Trump.
21 You shall not wrong or oppress a resident alien, for you were aliens in the land of Egypt. 22
You shall not abuse any widow or orphan. 23 If you do abuse them, when they cry out to me, I will surely heed their cry; 24 my wrath will burn, and I will kill you with the sword, and your wives shall become widows and your children orphans.Uhm, seems to be a bit of a moral contradiction here. If you abuse a widow or orphan, God will create a bunch of new widows and orphans.
25 If you lend money to my people, to the poor among you, you shall not deal with them as a creditor; you shall not exact interest from them. 26 If you take your neighbor’s cloak in pawn, you shall restore it before the sun goes down; 27 for it may be your neighbor’s only clothing to use as cover; in what else shall that person sleep? And if your neighbor cries out to me, I will listen, for I am compassionate.Fortunately we know this is not calling for human sacrifice, since we got the relevant instruction earlier. You have to redeem the first-born with a ram. But why God takes so much pleasure in killing and burning animals is a mystery.
28 You shall not revile God, or curse a leader of your people.
29 You shall not delay to make offerings from the fullness of your harvest and from the outflow of your presses.[g]
The firstborn of your sons you shall give to me. 30
You shall do the same with your oxen and with your sheep: seven days it shall remain with its mother; on the eighth day you shall give it to me.Seems kind of anticlimactic.
31 You shall be people consecrated to me; therefore you shall not eat any meat that is mangled by beasts in the field; you shall throw it to the dogs.