They warred against Midian, as the LORD commanded Moses, and slew every male…. Moses said to them, “Have you let all the women live? Behold, these [women] caused the people of Israel, by the counsel of Balaam, to act treacherously against the LORD in the matter of Peor, and so the plague came among the congregation of the
LORD. Now therefore, kill every male among the little ones, and kill every woman who has known man by lying with him. But all the young girls who have
not known man by lying with him, keep alive for yourselves. (Numbers 31:7, 15-18, RSV)
If God exists and is the source, author, and creator of human life, then the relationship between God and man is not on the same moral level as relationships among human beings. God is then well within His rights to take away human life, put those lives under a bond of marriage or servitude, and command others to do these things on His behalf. God can no more “murder” a human being than a human being can “murder” a clay pot. If one takes the premise of God’s existence seriously, then these accusations against God are really absurd. If one doesn’t take it seriously, then that’s a whole other discussion.
The case of the Midianites in Numbers 31 is a special historical case of God exercising such rights, not a promulgation of general law and morality for relationships among human beings. God gave the Israelites a special command with regard to the Midianites and gave the Israelites the 5th commandment “Thou shalt not murder” as a precept of general morality for human beings.
Why did God give this special command to the Israelites against the Midianites (and other similar peoples)? God judged the Midianites for their idolatry, sexual immorality, opposition to Israel, and dire threat to Israel’s culture and messianic mission (read chapters 22 and 25 of Numbers). He gave the Midianites the death penalty and commanded the Israelites to execute that penalty (“Arm men from among you for the war, that they may go against Midian, to execute the LORD’s vengeance on Midian.” Num 31:3). If we can assume these things in the mind of God, we can understand better how God was right to do and command what He did.
God gives no such special commands in our day and time.
And as for the captive Midianite virgins, God apparently permitted the Israelites to take them as wives or servants, but both wives and servants had particular rights under Mosaic law, including prohibitions against mistreatment (Ex 21:26-27, Dt 23:15-16, Dt 21:10-14). Numbers 31 does not describe God establishing any moral precepts regarding marriage, sex, or servitude. Strictly speaking though, as one can read, Numbers does not say that the Midianite virgins were forced into marriage. Most of them were almost certainly too young for marriage anyway (pre-pubescent).
It’s important to understand that there’s a difference between command and permission. Just because God permitted or allowed certain things under Moses (e.g. divorce, polygamy, servitude, arranged marriages) does not mean that He commanded or approved of those things in themselves or intended for those permissions or allowances to last forever, for all times and people. (“[Jesus] said to them, ‘For your hardness of heart Moses allowed you to divorce your wives, but from the beginning it was not so. And I say to you….'” Mt 19:8-9)
The Israelites were a rough, barbaric, and stiff-necked people (as were all other ancient peoples of that time). They were little children in civilizational terms and could not handle the fullness of moral truth at that time with regard to human dignity and sexuality. God gave laws and allowances that met the Israelites where they were civilizationally as a people at that time. With the coming of Jesus, God fulfills the law and commands the fullness of truth, as well as giving us the grace to obey and live it out and to receive mercy when we disobey it. (Of course, considering how few are the people who actually accept and cooperate with this grace to live out this fullness, we cannot necessarily say that modern people today are more civilized. Modern barbarism cloaks itself in “civility” and “compassion.”)
God was right to make these allowances for Israel for a time, just as a parent is right to make certain allowances for children until it’s time for them to grow up. “[W]hen the perfect comes, the imperfect will pass away. When I was a child, I spoke like a child, I thought like a child, I reasoned like a child; when I became a man, I gave up childish ways” (1 Cor 13:10-11).