If you overlook the breathtaking human tragedy, and no one should, you could argue that, from a deeply cynical perspective, the stability of Afghanistan no longer concerned or benefited the US. In fact, superpower and regional rivals were drawing leverage from America’s exertions.
Source: https://www.forbes.com/sites/melikkaylan/2021/08/11/did-the-white-house-knowingly-leave-afghanistan-in-chaos-if-so-what-are-the-possible-outcomes/