As the pre-eminent world power, the United States is in a position whereby it really has no option but to deal with bandits and bandit regimes such as Afghanistan and Iraq. There is no other power with the abiity and will to do it and to abdicate that "logic of empire" will be to allow the spread of a cancer,
That is pretty much why Britain went into Khartoom. Sure, the proximate cause was the capture of Gordon, but the real casus belli was to nip a cancerous growth in the bud.
Nations must act in their own best interest and a pre-eminent world power must act to preserve that pre-eminence. Otherwise, you could find yourself with the barbarian at the gate.
Bandit regimes continue to exist and work mischief only so long as world powers let them.
Use it or lose it.
When I grew up, the judicious use of military force was not a concept deemed so awful that we would refuse to study its uses and limitations.
-