To leave Afghanistan as a playground for terrorists and adventurers was simply not possible anymore.
The application of military force, or the prospect of such application, inhibits terrorist violence.
The success of a terrorist operation depends almost entirely on the amount of publicity it receives.