So we just write off an entire nation of people?
Here is a very brief history of Afghanistan -
In the 80's, Russia occupied it. The US funded rebel Islamic groups (Osama Bin Laden being one) to keep the USSR busy. Eventually Russia pulled out. The Taliban took over during the instability, creating a terrible extremist government group. In the 70's and 80's, Afghanistan had seen progress and modernization. Under the Taliban, women were forced to stay at home and the rich history and culture of the region was attacked as idolatry. The Taliban went as far as blowing up 2000 year old statues. It was a foreign government trying to erase the native history of the people.
The US went in after 9/11 under the pretense that much of Al Quaeda was being sheltered in Afghanistan by the Taliban.
The real problem isn't us being there, it is in how we execute our occupation. With the fall of the Taliban has come the rise of local warlords and a massive drug trade. This needs to be brought under control. Pulling out of a situation that we created is about as morally bankrupt as it gets, and I'm glad to see that multiple countries don't share your sense of morality.