This is an interesting report in the English version a Spanish Newspaper, summing up why the US operation in Afghanistan failed.
The black hole of corruption that swallowed up US investment in Afghanistan
Programs based on unrealistic objectives, excessive levels of aid and a lack of local understanding have contributed to financial disaster as well as military failure in the country
The key point in the failure is the wrong-headed nation-building attempt in a country in which the social, economic, and political structure of ethnic tribes and tribal warlords hash loyalty of the people. With the tribes having the primary loyalty of the people, there is no real nation state.