My friend’s view -—
This is very much a political defeat.
The Taliban were openly supported through men, material, intelligence and diplomacy by the Pakis and in proxy by the Chinese.
The US gave its own stamp of approval and legitimacy to the Talibs by dealing with them as a state power, by ignoring the legitimate Afghan government, and by declaring an exit date and releasing the Taliban prisoners even though there was no progress in the ‘peace’ talks.
The Afghan government on its part was busy infighting and kept secretly hoping till the end that the Biden administration and the international community will pull through and help keep the Taliban out or at least help negotiate a political agreement.
The Afghan military was demoralized and often cut out of the picture by local warlords and governors making secret deals with the Taliban.
The final outcome was bound to happen, and the Afghan army soldiers were right to not fight a losing war whose outcome had already been decided by the political entities long before the official American exit.
Thank you for this enlightening info.