The lesson the U.S. and the United Nations forces learned from Somalia was that going in to try to stop a war of genocide wasn't a simple issue. Many in Somalia wanted peace, but not enough to share it with members of that other rival clan, over there. We couldn't believe that could be true, but it was.
20 years in Afghanistan, it seems we were no closer to understanding what so many want, the populace is so badly fractured. Billions of dollars and years of Western training, and so many of the soldiers decided in the end not to fight.
Our best hope is that this is Taliban lite, that they will pull back a bit on their religious severity. That's the image they're trying to project now. But that could be a foolish hope.