>>656236
It's interesting to me that this verse is the point of offense and not the one beforehand.
Anyways, look at the context:
In Numbers 25 the Midianite women whore themselves out to the Israelites in order to get them to commit idolatry together with them (with the approval of the Midianite men), which causes a plague in the camp of the Israelites. We learn later, that the prophet Balaam advised them to do this, likely because he couldn't curse the Israelites otherwise.
God tells Moses in Numbers 31 to avenge the children of Israel against the Midianites and then Moses commands the people to go to war. Later, when the people return, having burned the Midianite settlements and having killed the men, they bring the women and children as captives.
Moses then commands the women to be killed, because they are the ones that caused the children of Israel to commit idolatry. Moses also commands the male children to be killed, for which there is really no reason given.
On the other hand, the girls are extended mercy and are saved alive. Given that the law very much protects female captives, one can expect that they will have no worse lives than the native-born Israelite women.
I don't think that this is divinely sanctioned pedophilia is what I'm trying to say, I guess.