Once upon a time, we went into Afghanistan to remove the Taliban government and eliminate a training ground for our friends from Al Qaeda. Mission accomplished.
Then we decided to stay around to "fix" the Afghan regime so it would be more "democratic" and to help stimulate the economy, so that Al Qaeda (and the Taliban) would never come back. Mission incomplete, in part because we took our eye off the ball and went to war in Iraq, instead, pulling Special Forces and civil affairs units out of Afghanistan in the process.
Then Iraq became the "bad" war, for the new administration, and Afghanistan became the "good" war. And, in the meantime, a lot of very enthusiastic military folks spiffed up our military doctrine, turning it into real counterinsurgency money (AKA COIN), and began to implement the doctrine, with equal enthusiasm, in Afghanistan.
Sad things had happened, meanwhile. The Mayor of Kabul, Hamid Karzai, could not make himself into a national president. The $27 billion we spent training Afghani soldiers and police did not produce a force that could bring security to the country. Opium production soared, fueling the Taliban, and filling the coffers of local poo-bahs and warlords.
In other words, we began a new strategy in a country without a central government, rampant corruption, a breakdown of order, and an almost non-existent economy and hoped we could tie it all together, bring governance, order, discipline, and development.
Why were we doing this? Not to remove the Taliban and Al Qaeda; we did that. Not to create a democracy or a healthy economy; we couldn't do that. So why are we there?
The only compelling reason being offered is that there would be a power vacuum if we left, one that would be instantly filled by the Taliban (and, perhaps, a return of Al Qaeda). But we are failing at preventing that power vacuum today. In fact, one might argue, the vacuum exists around us, and we are doing little and can do little to prevent it from emerging. And there is precious little sign of Al Qaeda being present in Afghanistan today.
The bottom line is that the solution to power relations in Afghanistan lies with the Afghanis. And since it is not a democracy, that means it lies with the Taliban, the warlords and their satrapies, and Karzai, to the degree anybody listens to Karzai. And it lies with the surrounding countries, notably Pakistan (who are the only government that can deal with the unruly forces and Al Qaeda in their northwestern regions).
We cannot "fix" Afghanistan. We will spend significant blood and treasure trying, but we are neither competent, nor welcome, to fix it. It is time to step back, look hard at the benefit of staying there, and rethink our presence. And that will mean deal-cutting, with strange bed-fellows, to leave behind some kind of security, based on indigenous militia and security forces, leaving the Afghans to "work it out." It may, now, be the best outcome we can expect; we are not preventing it by staying.