Why are U.S. troops still in Afghanistan, and why do most Afghans accept this? The main problem in Afghanistan is that the people who hosted al Qaeda are still there. Most Afghans still see these pro-Taliban elements as a threat. Most Afghans also feel that, without the United States; Pakistan and Iran would once again meddle in Afghan affairs. Most Afghans blame the Pakistani government for inflicting the Taliban dictatorship on them, and continuing to support unrest. .
The Taliban were mainly leaders from a few Pushtun tribes that tried to impose their brand of conservative Islam, and tribal customs, on the rest of the country. This was never popular, but many Pushtuns still see this approach to running the country as worth fighting for. The Pushtun tribes make up about 40 percent of the Afghan population. And even more Pushtuns live across the border in Pakistan.
U.S. troops have behaved well in Afghanistan from the beginning. The first U.S. troops entering Afghanistan in October, 2001, were U.S. Army Special Forces operators, many of whom spoke the local languages and understood the customs. That went over real well. In addition, there were CIA operators who spoke the languages, and some of them had helped Afghans fight the Russians in the 1980s. These CIA guys were local heroes to the Afghans, and instantly established trust.
When regular American troops came in at the end of 2001, and into 2002, they were sent to areas where pro-Taliban fighters were operating. The Taliban had acquired a reputation as being thugs and bullies, so the Afghans were glad to have the Americans helping to chase down the diehards. The American troops also got involved in a lot of aid and reconstruction projects. Thus the Americans were seen as generous, warriors, and not a greedy neighbor. The Afghans know about 911, and their tribal code of revenge made it understandable that the Americans wanted to chase down those responsible for the attacks.
Because of the al Qaeda terrorists, Taliban marauders, and potential meddling by Iran and Pakistan, not to mention the money and goodies that accompany American troops, Afghanistan is in no hurry to see them leave. This sort of thing can go on for a long time. For example, when American troops began to pull out of Germany in the 1990s, after being there for half a century, most Germans were unhappy to see the G.I.'s depart, and German politicians even came to Washington to try and stop the withdrawals. This was mostly about jobs, but also about a good relationship between Germans and the American troops.