An Act of Justice, Not War
Commentators explain that Moses' angry question highlights a crucial distinction. This wasn't a typical war where women and children are spared. Instead, it was the execution of divine justice where the women were considered the 'worst criminals' for seducing Israel into sin at the instigation of Balaam.