Well I am no specialist as it comes to things like this, never the less I share a small fragment of my thoughts. The Taliban had a couple of things the USA and their allies didn’t have or had a shortage off, being time and will, both cost nothing but patience. They had the time to wait it all out and they had the will to do so. If you were to look back in history only a view countries whom conquered by another held on to it indefinitely. Maintaining a status like that takes billions and billions in cash and resources and numerous lives unfortunately. Given the fact that the Taliban took over control after the US and their allies retreated, is proof they still had some sort of control in every layer of the society and army.