The problem with terrorism is that people fail to understand, usually due to a complete lack of actual study, what is actually going on in these countries.
It was pointed out to me by an Egyptian friend that the US glorifies suicide missions, in film, war, and society. People who run into buildings, jump on grenades (or are thrown on them), or go into a scenario against the grim reaper odds are considered heroes. This is not because suicide is seen in a positive light, but because the individual is seen to be trading their lives for a more noble purpose. The same is true in the world, but for some reason while this connection is easily made in the US, the connection is not made outside the US.
In short terrorists obviously believe they are fighting for a noble cause that justifies their actions. When the US policy actions, not goals, but actions, are seen, it is faily obvious why opposition to the US is considered noble.
The US supported and funded Saddam. Saddam was just as bloodthirsty when the US supported him as he was when the US opposed him, but at the time it suited US purposes. The US funded Osama Bin Laden, again at the time it suited the USs purpose. I live in Egypt. The US has been supporting the Egyptian dictatorship for over two and a half decades, which I know for a fact has resorted in a rise in militant Islam. The US created the nation of Saudi Arabia, and the excesses of the Saud family has soured the population of that national fabrication. The CIA actually deposed a liberal democracy in Iran, which led to the rise of the Ayatollah regime.
The problem is that short-term aims have been somewhat successful, but the long-term ramifications have resulted in the problems we are seeing today. What we need is a fire-hose dosage of education to make long-term and short-term goals synchronize. As long as the short-term takes precedence the US will be viewed as a capricious, arrogant, imperialistic, ignorant, and most importantly interventionist nation that deserves retaliation. Unfortunately if the same were applied to the US by an outside source most US citizens would favor violence as well.