I don't think it's religion that is the problem either. Sure, it's a problem in the sense that Muslims believe in heaven and if their faith is strong enough blowing themselves up is good. But this is just a question of tactic. The world is full of examples of atheist communist terrorists also. Killing Fields in Cambodia!
I think this is very deep. I think terrorism is the tool of the powerless to make an impression in the world, no matter how small. It's like those people on the reality TV shows. Insignificant people who feel their lives are worthless, who just want to fill it with some meaning. To make a difference to someone somewhere.
I think terrorism is the symptom of pure unadulterated spiritual desperation.
Or to put it another way. Let's say a person has a loving wife, a family a good job, a hobby you enjoy and friends you can trust. If you remove all that, what is left to sustain the spirit? We all need goals to work toward. We all need signs that we're getting closer to them. If we aren't our soul dies. Is that so strange?
I think all fanatics are at their core only trying to drown out the sound of their own thoughts reminding them that what they're doing is futile.