The book of Deuteronomy provides a review of the laws of God, given to the Hebrews prior to their entering the Promised Land. It’s important for us to understand that these laws were written for a fallen people, so many are dealing with situations that are less than ideal.
In Deuteronomy 21-22 we find several laws related to women. In 21:10-14 we find rules for men who take woman as captives of war. In verses 15-17 are rules for men who have two wives, one who is loved and one who is unloved. And in chapter 22:13-30 are laws of sexual morality. These laws are hard for us to understand since their culture was so different that ours. But one thing stands out in each of them. God spoke out in the defense of helpless women.
In the passage dealing with women taken captive, God gave permission for a man to marry a captive who delighted him, but first he had to allow her a time of mourning. If he changed his mind about wanting to marry her, he could then set her free, but he was not to sell her for money or mistreat her.
The law about the two wives was to make sure that the unloved wife was treated fairly and that her sons received the treatment they deserved and that the sons of the loved wife were not given undue preference.
With the morality laws, God was protecting the innocent wife who was unjustly accused by her husband. In addition, if a man took advantage of an innocent virgin, the law made sure that the young woman was provided for.
Though we may not understand these Old Testament laws, we can appreciate that God speaks out in defense of innocent women.
Read about laws concerning women in Scripture: Deuteronomy 21-22