In this key passage, the key point is in the last two verses. In the first part we have an outline of some finer points of doing things that defraud your fellow man. It contains a nasty mixture of lies, theft, trust, extortion, and other such things. The main point of these few verses is to point out that there are consequences for our actions. Sometimes the punishment for breaking a law are serious, and get the death penalty. Most have a lesser punishment such as this one about lieing and stealing Crime and sin have consequences, and deserves punishment.
We are told of these harsh things because unfortunately, in our society there are some people out there who just don’t abide by the ethical and moral teachings of either God’s law, or any law. The punishments need to be fair and fit the crime. The punishments also serve to protect the guilty party to a degree. Maybe the person will consider it a wake up call and learn to reform his ways. It should at least be fair based on the extent of the crime that was done. From the victim’s point of view, there might be a large amount of emotional sentiment attached to the item lost, or devastation at being violated. The punishment is to regulate the punishment and not punish the guilty person beyond the real weight of the crime.