Why does God insist on enemy women and children being killed?


“Have you allowed all the women to live?” he asked them. “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. Now kill all the boys. And kill every woman who has slept with a man, but save for yourselves every girl who has never slept with a man.” Numbers 31:15-18
            In this specific war with the Midianites, God told the Israelites to wipe out everyone.  The women were being punished for following Balaam’s advice to entice the Israelites to be unfaithful by sexual offerings to false gods.  The Israelites were also punished for this act.  Later, God allowed the virgins from the enemy territory to live since they did not take part in this sin.
            God knew the Midianite boys would grow up angry, a chip on their shoulder, and could one day rise up and take vengeance on the Israelites.  They were a threat and needed to die.  God knew the hearts and future of those being killed and thought it best that they die.  It’s a hard decision but who better to make it than God.