Afghanistan is by almost any measure imaginable (with the exception of AIDS and parasitic disease infection rates) the most impoverished, unhealthy, undeveloped country in the world outside of sub-Saharan Africa, often by a large margin, and on some measures, like the percentage of people with access to clean water, or calories of food per day per capita, is worse off than any other country in the entire world.
Literarcy is low, especially for women. Sanitary toilet facilities are rare. Maternal and infant mortality are extremely high. Girls marry young and often involuntarily. Debts are sometimes settled by bartering children. Per capita income is low. Telephones and televisions are rare. Many places outside major cities don't have fixed power plants and electrical lines (although there are generators). Few people outside major cities and military bases has internet connections. Life expectancies are short. The average age is close to the youngest in the world, and middle aged or older adults are rare compared to any country in Eurasia or the Americas. Drug abuse is common. Many communities don't have schools. Central heating is the rare exception in a place with high desert winters. The roads are in poor repair and scarce. Unemployment is rampant, which is particularly dire in a nation with no real welfare state, particularly if you have seven hungry children. It is one of the few places in the world with violent death rates higher than drug war torn Northern Mexico. A large share of the population is engaged in marginal subsistence agriculture. A business with ten employees engaged in non-automated craft work or automobile repairs pretty much qualifies as "big business" there. Most of the country has no banks. Most of the country lacks the extravagant mosques of the Saudi Arabia, Iraq, Iran, Pakistan and India. The educated middle class, such as it was, largely left all but a few of the biggest cities in the late 1970s and early 1980s. The country has been embroiled in civil wars for decades when U.S. forces joined that conflict in 2001. This basket case of a country is also deeply divided on ethic and linguistic lines, more a collection of leftovers from other countries than a nation-state in its own right. It is a world that Thomas Malthus and Thomas Hobbes would have understood well.
Afghanistan makes stereotypical examples of Third World deprivation like Bangladesh look like lands of plenty. Ethiopia has more food. The Reconstruction era American South had better bathrooms, better stocked stores and fewer disabled veterans of past wars. For that matter, the classical Greeks, classical Romans, classical Egyptians, classical Sumerians and the Harappans of ancient Pakistan had better municipal infrastructure. The Bronze Age Hittites has a more developed mining and metallurgy sector of its own. Afghanistan makes a tough ghetto in a Rust Belt American city look like a wealthy, technologically advanced, safe, well governed heaven. (Although unlike Port Angeles, Washington, they apparently lack killer mountain goats.) The only remotely successful industry in the country is opium poppy growing, and that business isn't looking good in a country where the Taliban remain on the defensive, the borders are patrolled again, and the foreign troops and aid workers in the country make it harder to do business. Poor people in Southern Africa and Chile toil in unsafe mines for peanuts. Poor people in Afghanistan walk over vast mineral wealth every day without knowing that it even exists.
The Taliban, who are the main U.S. military opponent there, the terrorist groups they failed to rout after 9-11 having long since departed for greener pastures, are likewise a pretty pathetic military force. They have no tanks, no armored personnel carriers, no airplanes, no drones, no artillery too heavy to be carried by infanty, no documented anti-air missiles, no helicopters, no fortified bases, no modern hospitals, no non-line of sight missiles, no navy (not that a navy would be very helpful in the landlocked country), very few if any night vision goggles, little body armor, few experienced officers, low kill v. be killed ratios, a poor track record of success in suicide bombings, lots of soldiers detained, and low pay. They can't afford mercenaries, only foreign volunteers. They have no nuclear weapons or chemical weapons or biological weapons and no allies who will threaten to use them on their behalf. They have civilian vehicles, tents, borrowed civilian buildings, rifles, mortars, rocket propelled grenades, and improvised explosive devices (their most effective weapon). But, they aren't as good at improvising explosive devices for want of skills and materials as the Iraqis or the Palestinians. Their riflemen are grossly inaccurate and their ammunition supplies are limited. They don't have the luxury of months long basic training regimes. Many of their soldiers can barely read and are barely more than boys. The Taliban are an order of magnitude less well trained and equipped and organized than the remnant Iraqi military forces and foreign fighters the U.S. fought in Iraq, most of whom had serves in one of the Middle East's more professional and effective military forces before the U.S. troops arrived, most of whom were literate, most of whom remembered what a functioning government looked like. Most of the Afghan Taliban who do have a little education were trained in theology, not engineering or management or politics.
Their cell phones and radios are open books to the armies that are trying to kill them. Their movements can be tracked with satellites and drones. They are moving on foot and by donkey. Bribes and plunder are a big part of the Taliban military compensation plan. A large portion of the Afgan population are children, and a fairly large number of adult men have been disabled at some point in war or work. Many adults have the failings associated with growing up malnourished. The minority of women in Afghanistan who aren't little girls, pregnant, nursing or elderly have largely not been co-opted to fight this war. Their supporters in Northwest Pakistan have been undermined by the biggest flood in a generation and distracted by the Pakistani military's attacks on them, as well as U.S. drone attacks.
The Taliban are certainly making a concerted effort, and they have bounced back from their initial defeats at the hands of U.S. forces and Afghan warlords. They are fighting on their home turf, have nothing to lose, are ruthless, have the recent memory of having run almost the entire country, have the courage of their convictions, speak the language, and understand the people better. But, they are themselves a foreign sponsored missionary organization at heart. Their roots in the country are a few decades old in a place where people trace their tribal roots back thousands of years to Vedic warriors and lost Biblical tribes, accurately or not.
Unlike the Viet Cong, for example, they aren't a sovereign proxy force for a powerful nation with money and advanced weapontry. The Vietnam War, for example, featured many dog fights with an opponent who had military aircraft. Supporting them is the hobby of disaffected wealthy elites in the Middle East (especially Saudi Arabia) and to a lesser extent a political and religious minority faction in Pakistan, and to a lesser extent, corrupt local servants of foreign powers there now. The former Soviet Republics to their North are not their friends. Yes, Vietnam and Afghanistan and Iraq were all counterinsurgency campaigns. But, both Vietnam and Iraq were far healthier by comparison. Afghanistan is more like Somolia or Darfur than it is like Vietnam.
The Taliban's efforts are helped by the fact that the civilian government in Afghanistan is weak, corrupt and is losing its democratic mandate with flawed elections. But, the Afghan government's civilian constitution is far more workable than the one that was adopted in Iraq and developed more democratically. It has fewer legal traps that can deadlock government officials for months trying to form governments or pass budgets, it is simpler, it doesn't have the same seccessionist issues to deal with as Iraq (where the Southeast and Kurdistan would like to leave the country), it provides for greater local autonomy, and it doesn't have competing civilian and religious power bases the way Iran does. Its express commitment to Islamic law as the law of the land gives the Taliban less to rally around the insurgents against the pre-Soviet Western oriented monarchy and Soviet regime had. The civilian government's military forces may not be particularly impressive, but they are better trained, better equipped, more able to train in the open, more likely to be paid consistently, and have a bigger organization framework than the Taliban does. In Iraq, insurgents rallied around a vision of a new Sultanate. In Afghanistan, the memories of monarchy and Soviet style communism still leave a sour taste, and the theocratic Talibann regime looked good only in comparison to the anarchy that preceded it. There aren't a lot of other compelling political visions in Afghanistan to compete with the current regime.
The cost of the military effort of the U.S. and its allies in Afghanistan is several times the nation's entire GDP, particularly after the recent U.S. surge in troop levels. And, while bloody conflicts rage in some provinces, a minority of Afghan provinces have produced the vast majority of U.S. and allied force casualties. This is a regional conflict within Afghanistan, not a nationwide active battlefield.
We broke Iraq which is still worse off than we found it, has millions of refugees abroad as a result of a war we brought to it, and has undergone a massive ethnic cleansing campaign that has left the country far more segregated regionally than it was before we arrived.
Afghanistan was broken when we arrived, is arguably marginally less of a hell hole than it was when we got there, has been united under some semblence of a democratic civilian government for the first time in a generation, has substantial swaths of territory that are reasonably secure militarily, has not undergone major demographic shifts as a result of our presence, and has not produced millions of refugees as a result of our arrival (which is not to say that the world is not awash with Afghan refugees, they just left before we arrived), despite being similar in geographic size and population to Iraq. Afghanistan is much worse off than Iraq would be even if all of Iraq's oil wealth disappeared tomorrow.
We learned the hard way on 9-11 that the price of leaving even one little obscure hinterland anywhere in the world, even thousands of miles away, in a place we've never ruled, to fester in a pit of utter poverty, war, anarchy and religious extremism leads to horrible consequences. Letting the Taliban return to control outside the framework of an Afghan civilian government that can keep it in line in a democratic (or at least non-theocratic) system would be an act of deferred self-mutilation.
But, we also need to avoid falling into the trap of thinking that weakness is strength. Asymmetric warfare gives the weaker party some advantages, but weakness is still weak. Superior military forces with superior economic resources have been defeating weaker military forces for thousands of years, and there is no reason to believe that the laws of war have been rewritten in this little corner of the world at this point in history. There is a reason that the Taliban have decided to send emissaries to civilian government of Afghanistan to negotiate some sort of political settlement. Their capacity to wage war is limited and once again, winter is coming.
Our goal in Iraq was to replace a regime that we mistakenly thought was a threat to its neighbors. Our goal in Afghanistan is to allow for a regime to take hold that can prevent non-governmental actors there from posing a threat to us; their neighbors are well equipped to protect themselves from this militarily feeble opponent. Our end game goal for Afghanistan is less ambitious, but since it started off so much worse off, getting it to a point where it can function well enough to suppress non-governmental military and terrorist threats is more of a chore. It is harder to create than to destroy. It takes more time. I'm not at all sure that the current strategy of our forces there is the right one. But, if the U.S. military in concert with the other resources of the United States government and our military allies can't defeat a foe this pathetic, it may as well give up, send all of our soldiers back to their homes, and shutter its doors.