Fair question. I believe the answer was that Al Qaeda were operating training camps for terrorists. This was known, and the previous U.S. administration (Bill Clinton's) had done nothing about it, making the September 2001 attacks more possible.

It seems to me one of the lessons of this particular Afghanistan war was that there are no obscure backwaters any more though, no doubt, the U.S. is doing the same thing - training operatives in remote places, hoping to avoid detection and retaliation, and retaining plausible deniability.