According to the Wikipedia page on the current Taliban offensive, the combined Afghan army outnumbers the Taliban by roughly 3:1. The Taliban have less or worse equipment and vehicles, and the Afghan army had training by NATO forces. Based on this it looks like the Afghan army should be able to handle the Taliban - yet the opposite is true. Why is that?
Corruption is rampant in Afghanistan, including in the military. They routinely take bribes and sell military equipment to the Taliban. Basically, the average ANA soldier is there just to collect a paycheck, either legally or illegally. Combine that with the US withdrawal, and the fact that the Taliban is not being anywhere near as brutal as expected, and it should be obvious why the country is falling so fast.
The average ANA soldier knows the ANA is corrupt, they won't have his back should he stand and fight. He also knows the only force who would help him, the US military, is leaving. Last, he knows the Taliban aren't doing mass executions of surrendering ANA troops. So why wouldn't he sell them his gear and surrender? And every ANA soldier who comes to this conclusion reinforces the first point for the next ANA soldier contemplating surrender. There is a momentum aspect to defeat, once it gets going it's hard to stop. Imagine you're an ANA soldier, and you hear about a whole ANA army corps surrendering. How good are you going to feel about your job?
There are multiple reasons behind this (in addition to the corruption of the Afghanistan government).
Firstly, the Taliban is not some foreign movement that tried to gain a foothold in Afghanistan, it is a quasi-grassroots organization formed heavily from the Pashtun areas (one of the main ethnic groups). Before the Taliban formed, Afghanistan was run by multiple warlords and factions. You can agree / disagree with their implementation of Sharia law, but people in areas controlled by the Taliban see an overall decline in crime and corruption, and more importantly, a large increase in stability and predictability of day-to-day life. The Taliban does make use of foreign fighters, but the movement is still perceived as a Pashtun movement with Pashtuns controlling it rather than a foreign one. This is different than the perception of the Afghan National Army as being foreign controlled.
Secondly, the (now former) Afghanistan government was heavily modeled on western democracies. That model doesn't necessarily fit the very complex tribal, clan, and ethnic societal structures. The Taliban's political system was entirely based on managing those structures rather than ignoring them.
Thirdly, the Afghanistan government never had 100% control over Afghanistan. Had it had control, it probably would have tried to bring the Taliban into the formal government. However, this was not acceptable to the US government up until it was too late in the mid-2010's. By excluding the Taliban, the government effectively excluded ~30% of the population directly and the people who support them politically although not directly a member of the Taliban. By the time the US had become amendable to this once it realized there simply was not a military option, the Taliban had re-gained the momentum and realized they could take the whole country back. Afghanistan is not completely Pashtun, nor do all ethnic groups support the Taliban. You will also find some rural versus urban differences in the type of society people want to have. However, not having an agreement and compromise with such a sizeable and powerful part of the country makes it extremely difficult to achieve a military based solution as their will to fight has / will extend across multiple generations.
"Meanwhile, the Obama administration / NATO leadership was coming to believe that the military fight against the Taliban was not the solution [...]. [...], the administration / NATO permitted the Karzai government to initiate talks with the Taliban commanders by faciling their travel to Kaubl [...]. Indurthy, R. (2011). THE OBAMA ADMINISTRATION'S STRATEGY IN AFGHANISTAN. International Journal on World Peace, 28(3), 7-52. Retrieved August 18, 2021, from http://www.jstor.org/stable/23266718
Fourthly, the Afghani Taliban received substantial foreign support via the Pakistani intelligence service. The reason for this is quite simple. Pakistan views its primary threat as India. Therefore, it wishes to keep all of its forces and military units positioned towards any potential war or conflict on the border with India. It simply cannot risk splitting its defenses on multiple borders or (even worse) a domestic threat from the Pakistani Taliban. The evidence of the potential disruption this could cause is clear when seeing the large number of causalities Pakistan itself sustained when confronting the Pakistani Taliban. All-in-all, it makes complete sense for Pakistan to maintain favorable relations with the Taliban.
Lastly, is Afghanistan really a national identity? Its borders were drawn for global strategic regions, not based on an existing national identity. As an analogy, would people be willing to risk their lives for the European Union? Possibly not that many, but many would risk their life for say Italy, Spain, Germany, etc. Identity is complex in Afghanistan, but as an outsider, it seems there isn't much of a national identity for which people would risk their lives. Possibly by coincidence, but you find this problem in many areas of the former British empire in which the lines of the national border simply don't make any sense as they are drawn. Hence, there is no shame in abandoning the Afghan National Army.
However, honor is a very serious topic with respect to tribe, clans, or family. It is something that people will absolutely fight and die over (not only with respect to this specific conflict). If any / all of those social structures are supporting the Taliban, it is a very serious issue in their culture to simply abandon the fight or show cowardice. Often, several members of a unit may be related. Hence, Taliban fighters have a lot more riding on how they behave and perform in the conflict.
This article in the Guardian today answers precisely this question:
It is a tale of two armies, one poorly equipped but highly motivated ideologically, and the other nominally well-equipped, but dependent on Nato support, poorly led and riddled with corruption.
The article emphasizes how the strength of the Afghan army was overestimated by the US:
It found the US military to be persistently overoptimistic about Afghan military capability
The Afghan government cannot always pay civil servants and soldiers:
The additional problem was a central government facing a severe fiscal crisis precipitated by the loss of customs revenues and declining aid flows. Many officials complained that they had not been paid for months.
A different article in Vox a few days ago mentioned the same issue. Apparently the Afghan government is not even able to reliably bring food or provide ammunition to some of the army bases:
In some places, these remote villages and outposts that the Afghan government had been trying to prop up had become surrounded. The Afghan government couldn’t get them ammunition. It couldn’t get them food a lot of the time. A lot of the people at these outposts, they weren’t getting regularly paid. Their families weren’t getting their paychecks consistently from month to month. And so you’re talking about a terrible level of morale among the Afghan government’s security forces.
Another problem mentioned in the Guardian article is the strategy followed by the US to train the Afghan army:
At the outset, the US began transforming the Afghan National Army from a light-infantry force to a combined-arms service with army, air force, and special forces element.
However a modern army strategy might not be compatible with corruption and illiteracy:
The watchdog had, it said, repeatedly warned about “the corrosive effects of corruption” within the force. With its reliance on advanced equipment, and with widespread illiteracy in its ranks, the force could not reliably maintain its strength and combat readiness.
The Sigar report found that from 2005 the US military had been seeking to evaluate the battle-readiness of the troops they had been training, but by 2010 acknowledged that its monitoring and evaluation procedures “failed to measure more intangible readiness factors, such as leadership, corruption and motivation – all factors that could affect a unit’s ability to put its staffing and equipment to use during actual war-fighting”.
The Afghanistan Army doesn't seem to be putting up a fight, at least for now. According to the Afghani Ambassador to the Netherlands, as reported by Nieuwsuur (see my translation below):
'Terugtrekking leger is strategisch'
De snelle opmars van de terreurbeweging wijt hij vooral aan de snelle terugtrekking van Westerse troepen. De Verenigde Staten hadden bij het vredesakkoord met de Taliban vorig jaar hardere voorwaarden moeten stellen, vindt hij. "Het terugtrekken had gelinkt moeten worden aan vrede. Want de Taliban wachtte twintig jaar lang het moment af dat de internationale legers zich zouden terugtrekken."
Toch is het nog geen einde verhaal voor Afghanistan, meent Rahimi. "Het Afghaanse leger trekt zich terug uit steden om schade en doden in dichtbevolkte plekken te voorkomen. De legers zijn nu in hun bases, ze zijn niet verdwenen en kunnen snel terugslaan als ze logistieke hulp en luchtsteun krijgen van NAVO-landen."
"De Taliban denken dat ze dicht bij de overwinning zijn, maar dat is niet waar."
Translated by me:
'Withdrawal is strategic'
He [the ambassador] attributes the rapid advance of the terrorist movement [the Taliban] primarily to the rapid withdrawal of Western troops. The United States should have insisted on tougher conditions at last year's peace agreement with the Taliban, he thinks. "The withdrawal should have been linked to peace. Because the Taliban waited 20 years for the moment the international armies would withdraw."
Still, it's not the end of the story for Afghanistan, according to Rahimi [the ambassador]. "The Afghan army is withdrawing from cities to prevent damage and deaths in densely populated areas. The armies are now in their bases, they haven't disappeared and can rapidly strike back if they receive logistical and air sport from NATO countries."
"The Taliban think they a close to victory, but that is not true."
While some of these statements seem questionable, e.g. that the Taliban isn't really close to victory, I think the ambassador is right about their troops not putting up a fight at the moment. With the army not putting up a fight, it's clear that the Taliban can recapture much of the country without facing much or any resistance.
Because the Taliban are massively popular ( https://twitter.com/AmerikaDC/status/1426845016383803393?ref_src=twsrc%5Etfw ), the public backed them against the corrupt puppet regime installed by the Americans and the snowballing effect of the Taliban advance caused the average ANA soldier to conclude that there is no sense in dying for a lost cause.
For full details, see my previous answer and associated discussion here: Are there any reliable indications on popular sentiment in Afghanistan for/against the Taliban?
P.S. If you'd fought your entire adult life, known nothing but war from childhood, would you take the moment of victory as intensely as this guy, breaking out in tears of joy in the middle of a raka'ah? https://twitter.com/RamizReports/status/1426839635725070337?ref_src=twsrc%5Etfw
A well-organized and ideologically cohesive military force comes in and tells people they will pay them if they fight for the military force. Most people don't agree ideologically with the military force but they realize they have no chance in a battle against the military force and so they take the money join them.
That continues for 20 years and then that military signals they want to leave and so another well-organized and ideologically cohesive military force comes in and does something very similar. Most people don't agree ideologically with the military force but they realize they have no chance in a battle against the military force and so they take the money join them. The first military force is the US Military Coalition, the second military force is the Taliban. In both cases people take the money and survive a little longer.
Much of the Afghan population never supported the US backed government, they only stayed in power because of the US army (and other countries at first) having a large presence and basically killing anyone who dared oppose them.
Yes, this is an unpopular idea in the west, where we consider ourselves the good guys and bringers of democracy and peace, but in places like Afghanistan people see us as foreign intruders who they want to get rid of.
The Afghan army, while reasonably well equipped by the US, lacked the motivation to fight once things started to go bad, and never had the numbers to control the country on their own, or even with the dwindling US support over the last few years. This outcome, the Taliban once again taking control over the country once the foreign invaders left in disarray (which is exactly what happened after the USSR pulled out) should have been fully expected but wasn't outside of Afghanistan (at least not in the US and EU, blindsided by our own ideology and high opinion of ourselves).
Mind I don't like the Taliban, but they were the legitimate government of Afghanistan before the US invasion installed a puppet regime, and they're the legitimate government once more now. And effectively they've always been the government in the mountains, where the influence of Kabul and the US was always felt only through air strikes on villages and camps, rather than through anything constructive like building roads, schools, and hospitals, improving living conditions and the economy.
For those people the Taliban, represented by their village or tribal leaders, have always (under some name and using some method) provided security, law enforcement, etc. while Kabul was just a nuisance that sent tax collectors and air strikes.
Overall too, Afghans tend to band together against any foreign intruders. This has been the case for thousands of years. and the Kabul government was seen as just a bunch of guys cozying up to foreign intruders by a lot of the population, not something that makes you popular in a country like that. They "won" elections mainly by excluding groups that would challenge that status, groups like the Taliban.
Adding to all the other great answers, I just found an article from n-tv which poses the same question and has an interesting point to add to the other answers. Apparently the 300.000 members the Wikipedia article in my question lists for the Afghan army is vastly overestimating the actual number of fighters:
Nach dessen Zahlen [des Anti-Terror-Zentrums von West Point] vom Juli 2020 waren lediglich 185.000 der 300.000 Soldaten oder Spezialkräfte unter Kontrolle des afghanischen Verteidigungsministeriums, der Rest waren Polizisten und anderes Sicherheitspersonal. Von den Soldaten wiederum waren demnach kaum 60 Prozent für den Kampf ausgebildet.
Eine treffendere Schätzung der [afghanischen] Armeestärke liege daher bei 96.000 Kräften, wenn die 8000 Luftwaffen-Angehörigen abgezogen werden [...]
Roughly translated by me:
According to their numbers [of the Combating Terrorism Center at West Point] from July 2020, only 185.000 of the 300.000 soldiers or special forces were under the control of the Afghan security ministry, the others were police and security staff. Only 60% of the actual soldiers were trained for combat.
96.000 would be a better estimation of the [Afghan's] army strength, if the 8.000 air force members are subtracted [...]
The same reason anyone wins a war; the other side chooses (or more rarely is unable) to continue. I don't know details in Afghanistan, but I expect that the Afghan army motivation wasn't very deep - a paycheck rather than ideology. Losing a paycheck is likely preferred to fighting against changes that you don't ideologically hate. Then there is the "lack of confidence" issue; if one army doesn't believe it can win,then it almost certainly can't. To be fair to the Afghan army, defense is inherently more difficult than offense.