Jack, you can remove governments fairly easily (if you have the biggest armed forces in the world) but you cannot remove the anger of millions and millions of ordinary Muslims who are afflicted by poverty, invasion, foreign-backed dictators, and corrupt governments.
There is the source of your jihad...not Al Qaeda. Al Qaeda is a reaction to the situation, not a primary cause.
My example about Oklahoma was meant to be ridiculous... It's only slightly more ridiculous an example than attacking Aghanistan over 911 and Iraq over nonexistent WMDs. I made it ridiculous IN ORDER to make that very point.
Afghanistan was not consciously harbouring anyone in the sense you mean....what I mean is, they did not know about any plot to attack the USA on 911 and were not involved. They were not in on it. Furthermore, Osama Bin Laden was a famous national hero in that country due to his efforts fighting the Soviets in the 80s, and they were not about to simply turn him over on the USA's say-so that he was guilty, any more than the USA would turn over one of its national heroes (pick any one) on the say-so of the Russians or the Chinese, if they demanded it after a terrorist attack on Russia or China. The USA would tell the Russians and Chinese to go to hell. Why would the Afghans necessarily believe that the USA's accusations against Bin Laden were correct in any way? Look at it from their point of view for once, and think about how it appeared to them.
They did offer to have Bin Laden put on trial in some Muslim country (unspecified) to investigate if the USA's charges against him were justified. The USA utterly scorned that suggestion...since it has utter contempt for Muslim justice, and makes sure to let the Muslims know that. This does not engender a positive response in Muslims. The Afghans likewise scorned the USA's war ultimata to them, because they are proud people.
Sounds to me like an entirely predictable situation when one country demands of another: "Either surrender this famous guy who is living with you or we will invade you and bring down your regime!" Countries tell other countries to go to hell when given such ultimata, so it's hardly surprising that the Afghans did not roll over, surrender, and deliver up Bin Laden. Their pride (and their honor system) would not allow them to.
The USA should have dealt with it as a crime, not as a war situation. Such a crime needs an investigation, accumulation of corroborating evidence, specific charges filed against specific individuals, and international police action taken. The Afghans were not their enemy...they were no one's enemy except for themselves.
Al Qaeda is a small, scattered bunch of people based in many countries. They can easily continue to function under many different leaders and from many different locations, including in friendly nations and allies. Invading a single poverty-stricken nation such as Afghanistan cannot possibly destroy Al Qaeda, but can only provide them with an army of new and willing recruits.