Ultimately, it's a calculus of "us vs them" and which lives are valued or devalued.
Relatedly, are police justified when they shoot at a house with 500 rounds, killing the suspect and their entire family that happened to be in the general vicinity? Is the math "one law enforcement > n lives as long as one was a (potential) badguy"?
If you wanted to do this with minimal civilian casualties, then you bring the ground forces in, block by block, and you clear things the old-fashioned way. You take casualties, but those are casualties who signed up to be "warfighters".
Now this IS inflamatory: I think we have a lot of warfighters and cops who are just plain cowards, that's the mentality. Why have a class of trained and armed people who are so afraid of dying that they'd rather kill anything and everything in their path than potentially be injured or killed?
I thought the ethos of the warfighter and law enforcement was "act as a shield, act as a bulwark, save lives, give my life so that others may be free, etc etc". Nowadays its "nah I'm not going in that school, there's badguys with guns and I might die, just stay outside".
That leads to a failure of imagination where somehow "blow up a building with innocent people as long as you got your target" seems somehow justified because you didn't risk a 'good guy' life. Cowardice.