Note that leaving terrorism unchecked also has a cost. I agree folks tend to have a perception of terrorism risks that outweighs the actual cost in lives. But while the psychology is in peoples’ heads, the dollar impact is real. People don’t want to invest in an area where terrorism isn’t a risk. People with means and opportunities leave such areas, creating brain drain. The existence of these unstable places like Afghanistan imposes a real cost on the people in surrounding countries.
Innocent people will die in any significant military action. And if avoiding those casualties is the overriding concern, then you should never engage in non-defensive military action. And that’s certainly a very defensible position, but I’m not sure it’s always the correct one.