I don’t know exactly how this works of course, but it may be like Britain and India (for example), which Britain “lost” and gained independence in 1947. For all the shame that Britain suffered for that, it actually turned out well for Britain, since they left such a cultural and technological image on India, which India used to its advantage as an emerging nation, turned around and became a kind of British ally & trading partner (so it worked out well for India, too). Additionally, East Indian expats mingled with Britain and helped modernize India. Even Gandhi, ostensibly a British foe, owes something to Britain. As a Yank, I’m even aware that in 1783, Britain “won by losing” the United States, as we subsequently became their best friend in subsequent wars, biggest trading partner, and exponent of their fairly just and inclusive brand of capitalism. So Vietnam and Afghanistan vets (on both sides) needn’t fear that their sacrifices were in vain, as these wars seemingly led (or may lead) to a rather bizarrely positive outcome, suffering and destruction notwithstanding. There are signs that Taliban may stand up to extremists and perhaps cooperate with West, if only to become economically viable (they may even expand women’s rights as a bargaining chip). Perhaps like Ho Chi Minh, the Taliban may turn out to be “moderates” once we stop “poking the bear”.