Taliban and Mujahideen have a common subset so it's not all black and white as it's been peddled here.
At the end of the day we live in a very hostile neighborhood so we must act like it.
No need to give Murica a free ticket, they have done more against India than we can count.
Add to that the fact that the Director of the CIA, William Casey said, "Political Islam and the Catholic Church are natural allies in the “realistic counter-strategy” of covert action and militant Islam and militant Christianity should cooperate in a common cause against the Soviets."
They were also aware that a significant portion of their arms and money that they were supplying to the ISI to be given to the Mujahedeen was being stolen by the ISI itself and they didn't do anything. The ISI wouldn't let them interact with the Mujahedeen; instead the ISI told the Americans to TEACH PAKISTANIS how to operate any new military equipment and to give them training, which they will later pass on to the Mujahedeen. And that's exactly what USA did.
And plus, if the noble USA just funded the Mujahedeen all for "independence", then can anyone explain why at ISI headquarters in Rawalpindi, Casey raised the subject of the most sensitive operation then under way between the two intelligence services:
pushing the Afghan jihad into the Soviet Union itself.
Beginning in the late 1970s, the CIA’s covert action staff had produced proposals for secret publishing and propaganda efforts targeting Muslims living in Soviet Central Asia as well as Ukrainians. Carter’s national security adviser, Zbigniew Brzezinski, was among the most passionate advocates for a covert American program to stir up nationalism in the Soviet Union’s non-Russian border republics.
So, if the goal of the USA was just "helping Mujahedeen get independence", why did they propose plans for fomenting Islamic jihad inside the Soviet Union? Whose "independence" was that about?
The CIA commissioned an Uzbek exile living in Germany to produce translations of the Koran in the Uzbek language.
The CIA printed thousands of copies of the Muslim holy book and shipped them to Pakistan for distribution to the mujahedin. The ISI brigadier in charge recalled that the first Uzbek Korans arrived in December 1984, just as Casey’s enthusiasm was waxing. ISI began pushing about five thousand books into northern Afghanistan and onward across the Soviet border by early 1985.
It was William Casey, the CIA Director himself who first proposed to the ISI to encourage the Afghans to carry out "suicide bombings". Casey said that there was a large Muslim population across the Amu Darya that could be stirred to action and could “do a lot of damage to the Soviet Army in Afghanistan and also in the Soviet Union itself".
It was the CIA, at the behest of the ISI, which funded and allocated the highest amount of resources to the most radical factions of the Mujahedeen, like Gulbuddin Hekmatyar who became the Taliban later on.
So, despite any excuses the Americans or their think-tank apologists might be making now, both the USA and Bhikaristan are equally guilty in fomenting and giving birth to the Taliban.