One has to ask in these post withdrawal days of the Afghan war: Was it worth it? The answer is yes if it promoted stability, reduced terrorism and added economic development to the world, which it attempted to do. The answer is no if the strategy was not correct for the circumstances on the ground. In which case the attempt was doomed to fail.
When I was teaching economics in Kazakhstan in the former Soviet Union and right after the fall of the Soviet Union, and subsequently with a visit three years ago to see the changes after 20 years, what is clear is that such a country as Afghanistan or Kazakhstan needs a semblance of industry to make a political change feasible. But while Kazakhstan could sustain a new political system with mining, petroleum and even manufacturing, a very mountainous Afghanistan with no easy link to the rest of the world due to its land locked position and low amount of rail and road way connections has much less of a chance to develop an industry that can sustain its government. Although, granted, Kazakhstan is not perfect, it has still achieved much more stability, equality and chance for political discussion than did Afghanistan, and with Kazakhstan this happened with only an army of volunteers rather than an army of military soldiers.
What this meant was that no matter how much the U.S. and its allies could stabilize Afghanistan, there was no easy way for the Afghan government to obtain funding from new industries to sustain itself. So, the only funding the Afghan government ever got was funding to create more stability and follow Western precepts of how a country should look and act, which is not much of a money making endeavor. On the other hand, the Taliban could sustain their operations, at least according to some economic analyses, with illicit drug money from poppyseeds that grow easily in the hills. Other crops for economic development either make much less money or grow much less robustly in the hills. So really it was not a war of ideology as much is it was a war of economic attrition.
What economic backing could the Afghanis had tried to erect? Not a high tech industry, because unlike India, there is just not a critical level of high tech personnel to sustain such an endeavor and so every time you educate a new tech person in Afghanistan they would easily leave for Europe, America or Australia to make money rather than stay in such a difficult location as Afghanistan. In India the tech people stay for the culture, the relatively low cost of living and the chance to get financing for a new startup of their own.
So what about mining? There may be potential for mining in Afghanistan but not quite the lucrative gold, copper or coal deposits of Alaska, but deposits of a much less lucrative and more environmentally challenging level. For example, Afghanistan may have rare earth metals or even lithium, so while mining such minerals sounds wonderful, the challenges of mining such minerals are never forthrightly explained by green economy advocates. Indeed, one of the reasons China is such a big rare-earth mineral producer is because it doesn’t mind the environmental disruptions and the low wage, labor intensive nature of the production that happens far away from the Chinese middle classes and in the rural, poor hinterlands of the country.
Nevertheless, without good economy building prospects for Afghanistan, it was always going to be a hard slog to stabilize the country. The last-minute chaos with suicide bombers could have happened at any time; that is not much of an issue as far as how and when to leave. It is just good to realize there was no way to overcome the illicit source of funding that the Taliban had in comparison to the lack of industry provided funding the Afghan government was able to develop and to leave as efficiently as possible and with as low a cost of life as possible.
Still, if you want someone to blame, you could scapegoat generals, diplomates or politicians, or maybe it is the fault of universities themselves, which these days emphasize such feel good subjects as leadership skills and tend not to challenge students by hammering through difficult to understand economic concepts and critical thinking skills all for the sake of improving student optimism. The real world requires real thinking.