"al-Qaeda, Arabic al-Qāʿidah (“the Base”), broad-based militant Islamist organization founded by
Osama bin Laden in the late 1980s.
Al-Qaeda began as a logistical network to support Muslims fighting against the
Soviet Union during the
Afghan War; members were recruited throughout the
Islamic world. When the Soviets withdrew from
Afghanistan in 1989, the organization dispersed but continued to oppose what its leaders considered corrupt Islamic regimes and foreign (i.e., U.S.) presence in Islamic lands.
Based in Sudan for a period in the early 1990s, the group eventually reestablished its headquarters in Afghanistan (c. 1996) under the patronage of the Taliban militia."
http://www.britannica.com/EBchecked/topic/734613/al-Qaeda
The text in read answers why US Troops were and or still are in Afghanistan.
al-Qaeda is there and the Taliban who declared War on the USA are there.
Up untill I read that article I did not know al-Qaeda was based in Afghanistan.