Why did the united stated get involved in the Afghanistan in 2001?

After the 9/11 attacks, the U.S. concluded that responsibility lay with agents of al-Qaeda, a terrorist organization headed by Osama Bin Laden. At the time, Osama bin Laden was being given safe haven by Afghanistan's radical Taliban government. After the Taliban refused to give up Bin Laden, the U.S. invaded Afghanistan to install a U.S.-friendly government. Since then, the Taliban have become rebels fighting to regain their power and that's pretty much the war.