I'd also lean toward the "other" response...but the differentiation between terrorism "over there" and "over here" is valid.

Quickly:

1. Fighting in places like Afghanistan is now ingrained into the local culture. They have been fighting their own "long war" for decades now. Any structure imposed by the West will be fought until the bitter end.

2. Terrorism conducted in Iraq and Afghanistan is clearly meant to de-legitimize the state. Taking down infrastructure has no other purpose, but once the coalition leaves, it will be a free-for-all in terms of civil war (which will look like "the West's" mess), but also in terms of security and future reconstruction. The optimist in me says that their war of attrition will be over once ethnic groups fill the security niches and start building infrastructure from the ground up - it will give them an air of legitimacy that the coalition could not establish. Huge motivator.

3. Attacks on the West serve many purposes. The first that we think of is the vulnerability of our own infrastructure. Second - to draw attention to a cause or perceived injustice. Beyond that, I'm no expert - I'd love to hear what everyone else thinks.

4. Finally, I think the religious aspect creates a sort of false binary...globalization is capable of uprooting longstanding cultural traditions, and there's a definite loss of power for those who previously held it. If transparency, rule of law, and strong nation-states are required for prosperity, it means relinquishing power, and standing mini-powers want no part of that. Of course, there are many other nuances (esp. regarding religion) that I'm overlooking, but for me, power and perceived power are the real keys here.