Remember that the Taliban were a liberating group who were highly popular in the area, at least for a few years, before it all went a bit pear shaped. Afganistan is a huge mess. You would really have to speak to the people on the ground who are going to continue to live there for years to come, and see if they think that the coalition has done a good job. I realy don't know that much about the situation before or now. Iraq was a huge huge cock up. The population of Iraq should be cheering for the west right now, for eliminating the oppressive previous regime, but the last survey that I saw suggests that as many or almost as many people think they are as bad off now as they were under Hussain. How we managed to turn a willing population so concretely against the British and Americans I do not know.
Afghanistan was a mess in the first place because the US backed revolutionary militias to fuck with the USSR back in the '80s (which is rather a gray area morally, because any successes by the mujaheddin inspired brutal retribution on the local populace by the soviets, and left them the most well-armed faction in the power vacuum that resulted from the soviet withdrawal, but then the massive cost, in resources and lives, ultimately ruined the USSR, leading to its collapse shortly after, which, although regrettable in some respects, also moved the thermonuclear headsman's axe a little further away from the collective throat of humanity). Then after toppling the government founded by those militias we neglected the country in favor of an inane attack on Iraq. Which quickly revealed that Saddam, while a brutal dictator, was much better than the local alternative, when
radically worse militias popped up to try to fill the power vacuum. The whole "knocking out the Iraqi infrastructure" part certainly didn't help either, or the gross mismanagement of the occupation from day one...