Now that we have removed the rhetoric about "bashing" and "in front of" we can discuss the issue.
Which is: Does God have the authority to determine who lives and dies? Did he have the authority when an area was flooded and many died (including children)? Did he have the authority when Sodom was destroyed and many died (including children)? Did he have the authority when an infant was born with a terminal disease and it later died? In this case the child may have (I say may have because I am not God and I don't know) died because God just knows best. That death may just be better than the alternative. You and I do not have the authority to determine life and death but God does.
And it does not really matter if you think he has the authority or not because he is the one in control and will do what he does regardless of what you think - that is what it means to have authority.
He made everyone and he gets to decide when they die (which we all do either sooner or later). When they are guilty then it just might be an act of judgment. That was the case with the adult Midianites (because the story clearly says that they were destroyed because they were enemies who would destroy Israel). When it is a child it is pretty certain that it is not an act of judgment against that child but God still has the authority to end a life. And when it is not an act of judgment then they individual misses out on 50 or 80 years of life but gains an eternity in heaven.
So what did God command and what did Moses do?
God commanded the war in which all the Midianites were to be killed. But the soldiers disobeyed and took the woman captive along with children. Moses then had to make a decision that would have a down side no matter what choice he made. His choices were:
* Leave them all alive to die a slow death in the desert of hunger, thirst and wild animals, with the prospect of being made slaves by the Moabites or used for child sacrifice to their god Chemosh as was their practice. There is no one to look after the children and the towns were burnt (Num 31:10).
* Kill them all.
* Kill the boys and assimilate the virgin girls.
* Assimilate all of them into the Israelite tribes. Then the boys would take vengeance upon the Israelites when they became men.
He. Moses, a human, chose option #3. I would agree that it was the best of four poor choices that were the result of the soldiers disobedience.