The war in Afghanistan is a direct result of american soil being attacked. I'm Canadian, and our troops are (rightfully) there in support of our American friends. The taliban government harboured Al'Queda, including those who did the 9/11 attacks. By allowing their territory to be used in the attack they committed an attack on all of Nato. The only surprising thing (to me) about all of this is that instead of devoting the bulk of your military resources to nailing down and hunting for the perpetrators of these attacks, your government went off and invaded Iraq instead.
The taliban still need to be destroyed. Afghanistan still needs massive amounts of reconstruction. For all the resources that have been applied, more still need to be applied. We are not in Afghanistan to prop up a fledgling democracy, we are not there to promote human rights. We are there to destroy a fundamentalist movement, and more effort needs to be spent in order to succeed.
Or we can let Afghanistan fall, again. They'll harbour enemies of the west, again.