In a better world, the soviets would have done all the hard work to introduce minor things like school for girls[1] to afghanistan in the early eighties, and then it would have gone capitalist along with the rest of the ex-soviet -stans, nearly bloodlessly, in the early nineties.
Help afghanis, yes. Help the taliban? That was a poor, even a foreseeably poor, decision.
[1] for an idea of the variation in that part of asia, compare music videos from tajikistan and from iran, for example...
Also, what other options did we have to help afghanis at the time? There were definitely numerous cons to supporting the taliban, but weren't they the most capable organization at waging war in the area at the time? I guess we could have tried to find more moderate opposition to the Russians but that would have come at the cost of having less capable opposition to the Russians.
I'm sure that some of our leaders, members of the CIA, and soldiers may have been corrupt and self serving in their decisions but I would argue that a majority of them were rational and honorable individuals who were doing their best to uphold the oaths they made to protect America. They were figuratively and some times literally giving their lives to something they truly believed in. It doesn't seem right to cast them all under the bus and say they were corrupt evil individuals without exercising empathy and contemplating what they knew at the time and the choices that were laid out in front of them.
(I'm not attempting to say that people were making corrupt decisions, I'm sure they were trying to do their best. What I'm attempting to say is that "providing advanced technology to people whose values are entirely contrary to yours" is not only in retrospect stupid, but should have been notably stupid at the time as well.)