I remember reading somewhere that Afghanistan has been invaded so many times in history that its now hardwired into the population to just let whoever is in charge run the place and agree with them whilst waiting for the next invasion.I've a good little book in my collection called 'The Great Game' which goes into a detailed look on all aspects of Anglo / Russian involvement in that region. It's books like that which gave me the perspective of looking at conundrums like this in decades (hell even centuries) rather than the immediate losses of now. I don't support our involvement, it was half arsed from the start.
I'm happy to be corrected on this but Afghanistan is a hard block to what was the Russian Empire to the likes of India, the Indian Ocean etc - hence why they built the likes of Kabul Airport in the 60's or helped the US build the road network - as it would ease their access providing Afghanistan remained an Ally.
Despite enough western involvement and attempts to influence Afghanistan will not and probably not ever recognise democracy as a reliable construct, at least not for another 100 years or so. It is a melting pot of many tribes, these tribes don't recognise state boundaries like that between itself and Pakistan and they quite happily hold blood feuds lasting 1000's of years over something as stupid as a neighbour allowing a dog to shit on their lawn.
It's dead ground, always has been and always will be. We don't gain anything in having it in our asset log but it does block the Russians from having true control and costs us very little (from withdrawal onwards). This flux of the populace going one way then the other, picking up weaponary etc left behind by the last lot trying to 'control it' are just fulfilling the role of security guard.