From Why Do They Hate Us?:
Are the roots of Islamic terrorism in the Middle Eastern conflicts? If the answer is yes, the solution is simple to formulate, although not to achieve: leave Afghanistan and Iraq, solve the Israel-Palestine conflict. But if the answer is no, as I suspect it is, we should look deeper into the radicalization of young, Westernized Muslims. In justifying its terrorist attacks by referring to Iraq, al-Qaeda is looking for popularity or at least legitimacy among Muslims. But this is largely propaganda, and Iraq, Afghanistan, and the Palestinians are hardly the motivating factors behind its global jihad.
First, let’s consider the chronology. The Americans went to Iraq and Afghanistan after 9/11, not before. From the beginning, al-Qaeda’s fighters were global jihadists, and their favored battlegrounds have been outside the Middle East: Afghanistan, Bosnia, Chechnya, and Kashmir. Abdullah Azzam, bin Laden’s mentor, gave up supporting the PLO long before his death in 1989 because he felt that to fight for a localized political cause was to forsake the real jihad, which he felt should be international and religious in character.