The goals have shifted in Afghanistan.
Paul Pillar puts it succinctly:
The counterinsurgency, with its goals of defeating the Afghan Taliban and stabilizing Afghanistan, has come to be treated as if it were an end in itself. It is not an end in itself. It is the result of a nine-year-long mission creep that has accompanied a deterioration of security conditions in Afghanistan, which in turn has accompanied the nine-year military presence there. It represents a major displacement from the original reason for a military intervention in 2001, which was to roust Al Qaeda from its Afghan home and to oust from power its then-allies in the Taliban.