This
We had all the info we needed to KNOW who the moderate faction was when the soviets were there. We threw them under the bus because the radicals were stronger against the soviets, who were on their way out anyways.
I've read in several sources that the US mostly supported the Northern Alliance/Massood, is that not true?
Either way, in the Cold War the US often supported some truly nasty factions because people saw Soviet victory in the Cold War as the worst thing that could possibly happen. Today we know the USSR was inherently weak and about to collapse, but back then most people expected it to last for generations. Look at the reaction of American press to Goldwater's idea that America should try and bring freedom (that is, capitalism) to the Soviets - capitalism in Russia was ridiculed as a completely impossible notion.
But today the notion that 'we should support awful factions because they side with us' no longer has a moral justification, and the foreign policy experts are running about like headless chickens to try and come up with a new ideology to justify their meddling.
"Spread democracy" doesn't work because then people will ask why America is backing people like Mubarak or the Saudi government- and because an ideology of spreading freedom imposes moral constraints that these people are not willing to operate under.
"Defending against radical Islam" is better for their worldview because most Westerners are completely ignorant about the different branches of Islam and do not want to learn. At any time any faction can be labeled as "radical" or "moderate" Muslims at the whim of a newspaper editor.