Then ask yourself if bad things can happen despite good intents. Truly horrible things, in fact, despite effort to prevent them.
Then, ask if this bombing was part of group A or group B.
And ask if we were trying to target people from group A or group B.
This is not an "ends justify the means" argument, I hope. But if you want to count bodies as some kind of justification for or against war because apparently morals can be reduced to addition and subtraction, you might as well at least classify the dead and causes correctly.