They say that smart people learn from others’ mistakes, average people learn from their own mistakes, and idiots don’t learn from mistakes. Based on that criteria, the US government falls squarely in the “idiot” category.
The Soviets tried to build a communist state in Afghanistan. They failed. The Americans tried to build a western-style state in Vietnam. They, too, failed. So what were they thinking wasting billions of dollars and thousands of lives in another useless nation building exercise?
The purpose of a military is to destroy nations, not build them. The US military did very well with the first part. They defeated the original Taliban in less than 2 months with minimal casualties. If they left in 2002, they could have claimed a spectacular victory. Instead, they decided to stick around for another two decades to do what exactly?