It is not just the Biblical critic who gets upset over passages like Numbers 31:12-18, but even those of us who believe the Bible contains God’s word for us have trouble understanding what God is doing. I remember sitting in Sunday school when a woman told us she was involved in reading the Old Testament. She said that she was horrified at some of the things that occurred, and admitted she didn’t understand many of God’s judgments, as they pertained to things of the nature we find in this Scripture. She finally concluded that she was glad to have been born this side of the Cross.
When Israel’s military leaders returned from defeating the Midianites and destroying their cities and religious structures, they presented all the spoil of the battle before Moses (Numbers 31:12-14). Immediately, Moses became angry with them saying:
Numbers 31:15-18 Have ye saved all the women alive? (16) Behold, these caused the children of Israel, through the counsel of Balaam, to commit trespass against the LORD in the matter of Peor, and there was a plague among the congregation of the LORD. (17) Now therefore kill every male among the little ones, and kill every woman that hath known man by lying with him. (18) But all the women children, that have not known a man by lying with him, keep alive for yourselves. (emphasis mine)
How are we able to justify killing these women and children? I’ll begin by admitting killing children is never just. It may be the better of two or more choices, such as is done in a dangerous pregnancy, but it is never something that is done, because it is the righteous thing to do. This being the case, why were the male children slain in Numbers 31? I have already discussed this issue in a number of blog-posts and application here can be made from some of what can be determined from those studies. Nevertheless, I could add that males were considered the inheritors of the their fathers wealth, whether that wealth would be land, gold and other marketable valuables or the family traditions. While females were readily absorbed into a foreign culture, this was not so readily true for males. Israel’s land would be given to Israelite males (with few exceptions). The young Midianite girls, when coming of age, would have no problem finding husbands among the Israelites, but what would happen to these young males? Indentured servitude might be all they could look forward to, and this was not a thing desirable in any of the ANE nations. Moreover, as I’ve pointed out elsewhere, Jews preferred death to a life of slavery, as did many other ancient cultures. There weren’t many options open for Israel to take at this point, especially since they hadn’t even entered into their inheritance yet. They chose the option they considered to be the most desirable option available (cf. Matthew 7:12).
Concerning the women who were slain, as I’ve concluded in previous blog-posts, we need to understand the part they played in Israel’s trouble. Remember, Balaam was unable to curse Israel for Balak who hired the prophet for that reason (Numbers 24:10). Yet, we understand from Numbers 25 that Israel had trespassed their covenant with God due to what the women of Moab and Midian had done (Numbers 25:1-3; cf. 33:1, 15-17). Twenty-four thousand Israelites died as a result of what these women had done (Numbers 25:9). Therefore, they were considered as much an enemy as the Midianite men who fought in battle (Numbers 31:6-7). The Midianite virgins were able to be absorbed into the Israelite camps without causing undue burden upon Israelite families, because the number of Midianite virgins, 32000 (cf. Numbers 33:35), wasn’t too great a difference than the 24000 adult Israelites who fell in judgment.
As I have already said, such things as these events are never ideal, but decisions had to be made, and those decisions that were made in Numbers 31 reflect the Jews preferences for themselves under similar circumstances.
 See my studies concerning the Amalekites: # 66 What About the Amalekite Children; #67 How Is Killing Children Just? and concerning the Canaanites, #62 Why Doesn’t God Spare the Innocent? At my Is God a Moral Monster page. Application from them should be made to bear upon the situation concerning the Midianites.
 Consider Philo’s account of the Jews’ preference to die (males killing their families and committing suicide afterward) rather than see their faith destroyed by the Romans, as that pertained to the Roman general, Petronius, placing a statue of Gaius Caesar within the Holy Place of the Jews’ Temple at Jerusalem Gaium (236). Moreover, rather than surrender to the Romans to be tortured and enslaved, the Jewish males at Masada killed their families and then committed suicide (Josephus, Wars of the Jews, Book 7, chapter 8, paragraphs 6 & 7 [320 to 388]).