There are several factors that affect the spiritual life of a human being. When a man does not have knowledge of the word of God, he is like the wind, we do not know where he comes from or where he is going. In this way, he can easily fall into adultery, since the knowledge of the word of the Lord warns us about this.
Solomon makes a comparison between the thief and the adulterer. The thief, when he is discovered and faces justice, ends up paying more than he has stolen. However, he also mentions that the adulterer steals, but it is impossible for him to repay.
The mention, or rather this comparison, that Solomon makes in this verse between the thief and the adulterer makes it clear that the thief can restore what he has stolen and even more, but the adulterer cannot do so. This is due to lack of knowledge.