Numbers 31:17-18 (underlined area specifically)
'17 Now kill all the boys. And kill every woman who has slept with a man, 18 but save for yourselves every girl who has never slept with a man.'
As the title suggests, what was God's focus in this particular case? I have struggled to find a logical rationale/conclusion, but thus far, draw a blank - in support of an asserted 'loving Yahweh'...?
Seems as though the author of this narrative 'commands' that the taking of virgins was permissible.
Thus, I now ask, what was God's rationale?
What all is going on here?
More than this brief excerpt shows, it turns out.
Let's have a look at the exact situation (earlier verses of this same story, the context and situation):
1 The Lord said to Moses,
2 “Take vengeance on the Midianites for the Israelites. After that, you will be gathered to your people.”
3 So Moses said to the people, “Arm some of your men to go to war against the Midianites so that they may carry out the Lord’s vengeance on them.
...
...
9 The Israelites captured the Midianite women and children and took all the Midianite herds, flocks and goods as plunder.
10 They burned all the towns where the Midianites had settled, as well as all their camps.
11 They took all the plunder and spoils, including the people and animals,
12 and brought the captives, spoils and plunder to Moses and Eleazar the priest and the Israelite assembly at their camp on the plains of Moab, by the Jordan across from Jericho.
13 Moses, Eleazar the priest and all the leaders of the community went to meet them outside the camp.
14 Moses was angry with the officers of the army—the commanders of thousands and commanders of hundreds—who returned from the battle.
---------
Interesting moment! Moses is angry. And now he will ad lib, we will see. And, this is not the first time Moses gets angry and ad libs. In fact, it's already doomed him to not be allowed to go into the promised land, the land beyond the Jordan, which is to be taken away from the child-sacrificing people/cities there.
(Moses had already gotten angry before and directly disobeyed the instructions about calling water from the rock in Exodus, to God's displeasure. God's aim was to grow the faith of Israel, and by striking the rock to get the water, Moses made it seem merely ordinary luck of knocking loose the right spot for a spring.)
----------
15 “Have you allowed all the women to live?” he [Moses] asked them.
[Generally God intended certain evil tribes to be wiped out; the degree of extinction depending on the degree of their evils.]
16 “They were the ones who followed Balaam’s advice and enticed the Israelites to be unfaithful to the Lord in the Peor incident, so that a plague struck the Lord’s people.
17 Now kill all the boys. And kill every woman who has slept with a man,
18 but save for yourselves every girl who has never slept with a man.
-------
Here Moses has ad libbed again. In a moment of anger. Perhaps not as harmful as before, it's hard to say -- that previous instance of Moses ad libbing in anger had harmed the effort to build faith in Israel, while here is a chance that survivors of a idol worshipping people will help lead Israel astray. (Idol worship generally means things like abandoning the real God, and sacrificing innocent children in fire, etc.)
It is uncertain which deities the Midianites worshipped. Through their apparent religio-political connection with the Moabites[9] they are thought to have worshipped a multitude, including Baal-peor and the Queen of Heaven, Ashteroth.
-- Midian - Wikipedia
Now, you would not know this unless you read fully through many full books in the Bible, but it is routine that individuals that are mostly doing what God wants (King David, etc.) will sometimes do some other thing, on their own, that goes directly against some instruction God has given them.
In fact, it's the rule: they will, at times, do what God did not instruct or want them to do.
God already has a plan for all people who die --
they will all live again.
All will live again, and face a fair day of Judgment: Romans 2:6-16. In fact, we can expect the innocent that died (children and others not commiting wrongs) will find His Mercy on that Day. Further, we know -- 1rst Peter 3 -- that Christ went to proclaim the to the "spirits in prison"....
So, no one that dies is actually dead.
Not yet.
Got that? Death is an illusion.
Now, if you assume the exact opposite: that death is final, you've merely assumed some version of 'god' completely unlike the one in the Bible.
In that case, you merely substitute in a made-up version of god, a kind of straw-god (pretend version), if you use that assumption that death of this body is final.
And, the fate of many it appears was not even set even after they died, and became disembodied spirits! Christ would come to proclaim to them after the cross!
So, when a mixed mass of people are all removed entirely from this mortal life, to the next, their culture erased from this world, they are still going to be sorted, the innocent on which God has mercy to eternal life, the unrepentant guilty to the second death (the real death).
You can just assume God does not exist by assuming death here is final, and then...it leads to an interpretation that seems to show God is entirely unfair-- that made-up version of God where there is no afterlife -- and with that assumption you are just arguing by yourself in a circular logic, if you do that.