While all of this is very unfortunate, it is certainly not unpredictable.

Governments and security forces established by a foreign power are going to be fundamentally lacking in popular legitimacy with a large segment of the society. Doubly true in a heavily patronage society like Afghanistan where life is so often an "all or nothing" affair. One is either in the right family or tribe to be rewarded by patronage, or one is not.

The have-nots are always waiting in the wings as a ready-willing and able guerrilla force to attach themselves to whatever foreign invader / manipulator happens to come along, be that Russia, Pakistan, Iran, the US or anyone else.

The US has tried three times now to employ a Democracy/Security Force Capacity strategy in support of de facto illegitimate governments of our design. Vietnam, Iraq and Afghanistan. It is a proven failure of a strategy.

I used to think the British model of raising local security forces under the auspices of British legitimacy was a bad model. I was wrong. Security forces need to be in support of legitimate government, and while one can lend their legitimacy to a host nation forces; one cannot lend their legitimacy to host nation government.

If the US had employed the British approach to raising local forces as US forces, I believe strongly that those units would have performed far better than the illegitimate ones we helped to train for their own illegitimate governments.

Better yet, if we would have had the vision and risk tolerance to allow self-determination of governance and diplomacy with whatever emerged to take place - we likely would have secured our interests in ways that avoided the conflicts all together.