We invaded to smash al Qaeda and punish the Taliban for hosting them. Mission accomplished. Within six months. The correct military action would have been to remove our conventional-force presence while the jihadi bodies were still warm.
Instead, ideologues safe at home declared that we had to nation-build where there was no nation. Or “we’d have to go back.”
Going back would have been an eff of a lot cheaper.
I doubt they invented it, but the Romans had a way of dealing with bad guys from lands they didn't want to (or couldn't) add to the Empire: The punitive expedition. Go in, kick some booty as dramatically as possible, then bug out. It wasn't a permanent fix, nor was it meant to be. Nor did it need to be.
How simple. How underrated. How did we forget that lesson?
Anyway, go read the whole thing.