Here is John McCain on the importance of Afghanistan:
We must succeed in Afghanistan for many reasons, but one stands above all: the world walked away from Afghanistan once, and it descended into a cauldron of violence, hatred and human rights atrocities that served as the base for the worst terrorist attack in history against our homeland.
McCain falls victim to the temptation of absolutes here. There are certainly some situations where an unstable nation poses an immediate threat and therefore it is in the interest of national security that said nation be stabilized. Take France in the 1920s. You had Germany next door, with a population 50% larger. Germany only a decade prior was a leading world economic, industrial, and military power but had become an economic basket case with unprecedented hyperinflation. The people were pissed, and especially at France. THAT is the situation where you get worried.
Then consider Afghanistan and the USA. The last and only time that I know of Afghanistan having a strong central government was the Durrani empire several hundred years ago. The US and Afghanistan almost couldn't be farther away geographically. The US has about ten times the population of Afghanistan. The US economy is about 1,270 times larger. The US has military bases all over the planet and strong military alliances with the majority of nations in the world. Afghanistan, even under the Taliban, will have no nation-state allies, but they will have many enemies in their vicinity including Iran and Pakistan.
I just think we really need to keep things in perspective when we talk about threats to the USA. Afghanistan never will be a threat to the USA. The attacks on 9/11 were perpetrated by some dudes who happened to train in Afghanistan, but they could have just as easily have been trained in Europe, in the Middle East, or anywhere else. And if every "cauldron of violence, hatred and human rights atrocities" warrants nation-building as McCain says, we might as well start in Africa because most of it is going on there.
9/11 didn't happen because the Taliban controlled Afghanistan. 9/11 happened because we let crazy dudes with knives board an unarmed airplane with no cabin doors.