It clearly lays out Biden's reasoning. Unlike the generals, Biden learned the lesson about nation building in Afghanistan. He knew what they did not want to admit: that we were wasting our time, resources, and personnel. It was time to go. Good for him for standing firm and getting us out of there.
https://www.nytimes.com/2021/04/17/us/politics/biden-afghanistan-withdrawal.html
There would be no conditions put on the withdrawal, Mr. Biden told the men, cutting off the last thread — one that had worked with Mr. Trump — and that Mr. Austin and General Milley hoped could stave off a full drawdown.
They were told, Zero meant zero.
In that moment, the war — which had been debated across four presidents, prosecuted with thousands of commando raids, cost 2,400 American fatalities and 20,000 injured, with progress never quite being made — began its final chapter. It will be over, Mr. Biden has promised, by the 20th anniversary of the attacks that stunned the world and led to more than 13,000 airstrikes.
How this last chapter of the American adventure in Afghanistan will end is a story that remains to be written.
Apologies that this article is behind a paywall. It also does an excellent job in laying out Biden's reasons for leaving.
As for the chaos over the past weekend, indications are that those who
say they didn't know
should have had an inkling that there would be no 'decent interval' with Afghanistan.
See the Afghanistan Papers:
https://www.washingtonpost.com/graphics/2019/investigations/afghanistan-papers/documents-database/
That said, even those who knew the Taliban would take over soon were caught flat-footed by how quickly the army and the government melted away. Ghani's own people were taken by surprise that he fled so quickly. Shame and blame for that is on Ghani, and no fault of Biden at all.