Was ol' Stansfield the CIA Director in charge of getting us taking hosage in Iran and giving the Middle East over to the people who became Al Qaeda??? Or maybe I was thinking of somebody else....
The mujahideen was created after President Carter signed an Intelligence Finding that authorized covert operations in Afghanistan.
The idea was to create a guerrilla type atmosphere against the Soviets in Afghanistan. The problem we had was that we had no human intel on the ground over there. Second, the Church reforms tied the hands of the CIA funding covert operations because they would have to publicly ask for the money for covert operations.
Therefore, with the help of the Saudis, young wahabi muslims were sent from Saudi (other countries as well, but mainly Saudi) to fight against the Soviets. It was an issue of Islam, and not anything really to do with Afghanistan. That was the unifying factor that got these people over there.
These guys were the resistance against the Soviets, and eventually turned into AQ and shifted their focus from the Soviets to ending reliance on the US from Saudi Arabia.
Thanks to George Friedman for most of this information. UI hope I did it justice.