Steve Coll's New Yorker piece on the hunt for Mullah Omar is behind a paywall, but I'd urge you to pick it up. It's always easy to understand why we consider a force like the Taliban "evil," but the less explored question is how "evil" comes to power. Of course when you start answering that question even the term "evil" somehow becomes inadequate.
In the Taliban's case, what Coll shows is a force that rose on its image of legitimacy. The Talibs were able to brutally enforce the law in places where anarchy reigned. Once they rose to power, the Taliban rode that image by staging gruesome spectacles of alleged criminals being subject to violence. In her lecture series, Margaret Anderson explains that the best way to understand the dastardly public torture of criminals in early modern Europe is to consider the need of authority to establish itself over great distance, in an era before cell-phones and a legitimate judicial systems.
From the perspective of the people, a known dictatorship with obvious bright lines is often preferable to utter chaos. The ability to erect those bright lines and to enforce them harshly and swiftly aided the Taliban's rise, and even now according to Coll's reporting, it sends people to their courts to adjudicate disputes.
When you read something like this, you start to understand the difficulty of establishing and maintaining a democracy, I have serious critiques of the criminal justice system in this country. But getting most people to buy into a system that presumes innocence, that accepts that many more people will remain free, having committed crimes, than those who will be wrongly jailed or even executed, is no small feat.