The US and NATO are in Afghanistan to suppress Al Qaeda, not to create an effective and humane Afghan state. But much policy seems to be driven by the assumption that you cannot suppress Al Qaeda without well-functioning government that can provide local security, is trusted by civilians, etc. Absent this, Al Qaeda can again use Afghanistan as a safe haven from which to launch attacks around the world.
An big risk, though, is that Afghanistan will come to totally dominate US counterterrorism policy, as Iraq did a few years ago. This is a problem because Afghanistan might not be all that important to Al Qaeda. The organization also has safe haven, to some extent, in Pakistan, Yemen, etc. and is also able to operate clandestinely in western Europe and the Middle East. The use of force in Afghanistan for the last 8 years has not prevented Al Qaeda from sponsoring attacks in Pakistan, India, Iraq, Indonesia, Jordan, Algeria, Britain, etc.
Wiping out Al Qaeda in Afghanistan via state building would be a hugely expensive and difficult task. And it might not work; the organization could simply shift more of its activities to other parts of the world.
Stopping Al Qaeda in Afghanistan leaves fewer resources for stopping Al Qaeda everywhere else. Instead of trying to reform the country from top to bottom, the US and NATO could play more of a balancing role among the different political and ethnic groups in the country. This would involve using carrots and sticks to reward groups that do not work with Al Qaeda and punish those that do. It would also mean leaving most questions of governance (or non-governance) up to the Afghans.
Such a divide and conquer strategy could have serious risks too. What would the US and NATO do if a political faction in Afghanistan engaged in gross human rights abuses? Or trafficked drugs? Could they just stand by and ignore this? What if the US and NATO continued to use drone attacks continued to hit civilians and drove some to support Al Qaeda?
There are no good options for dealing with Afghanistan. But I would point out that the current approach has not prevented human rights abuses, drug trafficking, or collator damage. Maybe it's time to put the threat from Afghanistan in perspective, and scale the effort and ambition there accordingly.