There are other interpretations about this:
Weren't the virgin women raped?
There are two parts to this objection: did God instruct or permit the soldiers to rape the women, and did the soldiers actually rape them?
It's clear that God didn't intend for the soldiers to rape the women, but rather to take them captive. The law God had given to the Israelites condemned rape, in some cases punishing it with death (Dt 22:25-27). Also, immediately following the command to spare the virgin women, the soldiers were instructed to purify themselves and their captives (31:19), and rape (or consensual intercourse) would have violated this command (Lev 15:16-18). In the rest of the chapter, the women are usually referred to as people (using the masculine adam), not women or virgins, underscoring the notion that they were seen as captives rather than sexual objects.1
It's theoretically possible that some of the soldiers raped the women, but given the circumstances it seems very unlikely. The soldiers would have known that rape was a violation of both the law and the instruction to purify themselves, as shown above; they had also seen God punish such violations with death during their travels in the desert. In fact, they had recently experienced a plague and executions resulting from their relations with Midianite women (25:1-9), as Moses reminded them. At that time, all those who had sexual relations with the Midianites were killed. It's highly implausible that the soldiers would have wanted to have anything to do with the Midianite women given this context.
So what did happen to the women (and children)? God gave the Israelites permission to marry women they took captive, but they were to treat their wives with respect: the women were to have time to mourn their families first, and were not to be mistreated (Dt 21:10-14). Those who didn't marry would have become servants, but there were rules against mistreating them as well (Ex 21:26-27, Dt 23:15-16). See the article on slavery laws for more on the treatment of female slaves.
www.rationalchristianity.net/numbers31.html
A particularly vile and mealy-mouthed post hoc rationalisation, which adds insult to injury by actually misrepresenting what the text actually says. So concerned is the above biblical apologist about exonerating the Israelites from rape, it omits to point out that Moses ordered the adult women to be
murdered. It is possible that there were a few adult females who were unmarried virgins, but that is unlikely.
As for the fate of the young girl virgins - I'm sure they were overjoyed at possibly avoiding rape once they'd been so gratified to see their fathers, mothers and brothers murdered.
Does the text relate to a
real historical event, instigated by Moses on the basis of what he thought was a command from God? Most likely not, since Moses probably didn't exist and this section of the narrative in Numbers is hopelessly confused as to the identity of the Midianites and the Moabites, who are sometimes referred to as the same people and sometimes different peoples.
That similar things did happen in ancient history is almost certainly true, and maybe the Hebrews of this time had a slightly advanced morality compared to other tribes around. But the fact that the text appears to applaud the wholesale murder of men, women, and boys does little to engender respect for the tribal Yahweh in whose name these horrors are committed.
Yahweh does improve in his behaviour and precepts later on in the Bible. All these images of God are filtered through the minds of the prophets writing about him. If you want to claim Numbers 31 as a legitimate portrayal of the righteous actions of the god whom you worship, that's your affair.
You don't have to be a Marcionite to write off texts like these. I wouldn't castigate you for a bit of cherry-picking (you might prefer Micah or deutero-Isaiah and have a better case). But if you want to justify the whole bloody text, you've got all your work cut out.