It is more complicated than that. I tried to find a thread I read earlier today where someone posted an analyses article on why the Taliban could take the country so fast. The analysis just scraped the surface but it was good enough. It took up the problem with the low moral among the Afghan forces, where the families send one son to the government forces to fight and the other to the Taliban forces to ensure security for both sons. (feel free to give me a link to that thread, I can't find it)
But it failed to mention that this has been not just known information to the US and the rest of the world for as long as the US been in Afghanistan. It has been an if not conscious so at least supported tactic of the US politics in and for Afghanistan. The key words in that article was:
In Afghanistan the clan / group affiliation is important: Taliban mainly consist of the country's largest ethnic group, Pashtuns the same group as the president that US installed. Northern Afghanistan has historically been the Taliban's weak point. In the north, Tajiks and Uzbeks are the largest ethnic groups. In the 1990s, there was the resistance movement called the Northern Alliance . In the run-up to the US withdrawal, the Taliban have had plenty of time to change their strategy in the north. While President Ghani has opposed the warlords who made up the Northern Alliance (and not recruited anyone from this area for the military), the Taliban has adjusted their strategy to include to stop mobilization of resistance in the north and worked to bring in other minorities, such as Uzbeks, Tajiks and Hazaras in their movement.
The reason for the presidents working against these warlords is because the previous presidents before the Taliban took power came from the Northern Alliance, the latest being Rabbani . Since 1992 he was the internationally recognized president of the state formation called the Islamic State of Afghanistan. In 1996, he was overthrown by the Taliban who took power in the country, but Rabbani's government continued to represent Afghanistan in the FN. Immediately after the invasion, the United States began actively seeking leaders who could take control of the country. Rabbani was still Afghanistan's president in the eyes of the outside world, but the United States wanted to find another candidate. There was some support for the reinstatement of the ex-king who lived in exile but has now returned to the country. At the end of 2001, US got Afghan leaders, Taliban opponents to agree to form an interim government under Hamid Karzai, the son of a Pashtun tribal chief who had been part of the king's government. After accusation of voterfrauds in the 2014 election US, instead of making sure to implement an election without voterfraud, they through negotiations led by John Kerry, appointed Ghani as president.
So the situation with the Afghan military was not just known to the US, it was a partly supported development during these 20 years of occupation.
To in that situation, just pack up and leave without any negotiations, advance warning to allies and so on. What amazes me is the lack of preparation, the fact is that one way or the other US knew what was going to happen. In Bidens speech there were a number of justifications for the withdrawal but few answers regarding the criticism of how the evacuation took place, He blamed the previous Afghan government for the situation. The only responsibility he admitted was a miscalculation that he expected the Afghan government to be in place and fight the Taliban during the evacuation. He does not take any responsibility for the situation. It is just cynical and lack of care for the Afghan civil population. The very excuse for starting the war in the first place. The biggest losers of the US policies in this case are the women.
His speech didn’t work for me it just pissed me of.