A Cornucopia of Guidelines
This passage is chock-full of different guidelines given to Israel and that's why this portion is called Mishpatim, meaning "judgments" or "laws" (See Exodus 21:1). Before looking at some of the trees, let us look at the forest as a whole—these guidelines were part of a special covenant relationship that the L‑rd established with Israel at Sinai. In chapter 24, this relationship ("marriage") is celebrated with a special ceremony—renewing of the vows (24:7). Why the gory sprinkling with blood? The people of Israel needed to be reminded that they were sinful people who needed their sins to be cleansed/removed through blood atonement.
We forget that we, as believers today, are also part of a covenant involving blood atonement—that we need as much cleansing from our sin as the people of Israel did. If we notice carefully, the guidelines in this portion covered every part of daily life—faith, family, business etc. The L‑rd wanted the people of Israel to know that He was concerned with every part of their life. As the people of Israel followed the L‑rd obediently, He undertook to bless them with long and prosperous life and "be an enemy to their enemies," (23:20-31). During times when Israel did follow the L‑rd, the L‑rd kept His end of the agreement (or covenant). As they departed from the L‑rd's guidelines, they removed themselves from under His protective umbrella.
The same holds for us—when we persist in stubbornly following our own ways, the L‑rd allows us to experience the consequences of our actions. He gave us His Word for our own good. If we follow the "owner's manual" things will run much more smoothly.
A brief note:
Tucked away in this portion is a brief section dealing with injury to a pregnant woman (vv.22-25). This section has been used to justify abortion because the Hebrew here is a bit ambiguous—is this section referring to a woman giving birth prematurely (as the NIV says) or her losing the fetus (miscarriage)? The pro-abortion advocates say that Scripture implies that the life of a fetus isn't as important as the life of the mother. That is why when there is a miscarriage, the men who caused it only have to pay a fine, but if the mother is killed, the penalty is much stiffer.
It is probably better to view it as the NIV does. If the mother is forced to give birth prematurely, then the fine is minimal, but if the injury is serious—either the fetus or the mother is killed, the men have to pay the consequences for it. This is much more in line with the rest of Scripture that teaches that life begins with conception.