Terror is a vehicle of a small and vocal group to enact prompt and sweeping changes by a much larger group, to establish more favorable conditions or treatment.
Since we are discussing the middle east, it is important to point out that the average person there gets treated like shit by their own leaders. Leaders that the west continues to support, despite their less than spectacular track records concerning humanitarian practices. (You know, like how they treated a certain troublesome journalist.) This leads to a disenfranchised demographic that is systemically oppressed, and whos oppressors are supported financially by strong international interests. (because modern society does not run on good will. It runs on energy resources, and the exchange of goods and services.)
This makes these demographics of people vulnerable to anyone who would offer a light in their respective darkness dominated lives. Bin Laden, and the extreme islamic cleric groups over there, are such individuals/groups, preying on vulnerable people.
These groups tell their supporters that the west does not care about them, and never will. That the west is only concerned with money, oil, and power, to further their own selfish consumption and selfish world political policies. And-- they are not wrong.
The purpose of terrorism is to do the following:
1) Make other people in "sheltered" societies that are supporting the wholesale subjugation of their own people, through their government's support of their oppressors, aware--- personally aware--- of what it feels like to have your loved ones killed in front of you, and to have no means of preventing it. (For the purposes of forging a commonality of understanding. The terrorists ultimately want people to understand that turning a blind eye toward suffering, any suffering, is unpardonable. The purpose of the terrorist act is to cause maximal suffering, so that it cannot be ignored.)
2) Cause sufficient material and logistical disruption in those countries targeted, along with sufficient civil unrest, to cause the governments of those targeted countries to reconsider their foreign and domestic policies concerning their support of oppressive government regimes.
Depending on which of those two goals the terrorist attack is intended to accomplish, determines the nature of the attack. An attack on the WTC is clearly the latter. The attack on a crowded civilian establishment is clearly the former.
In both cases, there is still a very clear thread behind the reasoning. "YOU CANNOT IGNORE US. WAKE UP, AND STOP IGNORING THE SUFFERING YOU CAUSE."
The commonly ascribed "Oh, those people are just crazy. Continue to ignore them." mindset is 100% at odds with that, and will only serve to further embolden the actions of the desperate, which terrorists are, by definition.
Sadly, even if the US and pals completely switched away from fossil fuel based energy, and left the saudis high and dry, it would not fix the domestic problems present in the region; the people there are still going to be manipulated by the next set of militant assholes that will crush them under their boots. (See also, what the taliban did, what extremist clerics do with sharia law, etc.)
Terrorism is what you get when you have vulnerable and oppressed people, fashioned into a weapon by the insidiously minded.