Because this is war and not a SWAT police operation?
If soldiers in the field have reason to believe the enemy is in a building and call in air support to bomb it, no part of that is a war crime. Even if someone later goes and discovers the people in that building were actually preschoolers; what matters is what the people in the field making the decisions knew at that moment.