Hello graphican,
The trouble was, they had harbored Bin Laden and organization. The US was in the middle of trying to figure out a way of negotiating with the Taliban in turning over Bin Laden for attacks that had preceded the events of 9-11. (See the attacks in Africa and the 2000 USS Cole bombing) Then after the event of a military attack on a very non military target (Twin towers), all negotiations were off.
I can only speculate that the Taliban was not aware of what Bin Laden and his organization was planning, otherwise... if they had any diplomatic tact, they would have dropped him like the hot potato he was and the US and it's allied coalition would have had absolutely no reason in being in Afghanistan.
As for Pakistan becoming more stabilized after or whenever the US leaves the country, i highly doubt that will occur. Too much has changed and transpired since 2001 for that to happen. Pakistan's best bet would be to work with and not against other countries in the region, as well as with a few form outside the region, in helping to make any Afghanistan government that is in place a more stable one.
Regards