Everybody thinks terrorism is some kind of modern phenomenon, but I see the same patterns of behavior that sent our ancestors a-warring and a-raiding. When a man is frustrated with his status (and legitimate advancement is much too difficult) then he's gonna lash out. And if there isn't a neighboring tribe handy, his own group will serve as a target.
People have described shootings as a form of suicide, and there's some of that too, but mixed in with that motivation is the desire for wealth, power, and respect. These men are so badly disenfranchised that they're fine with risking death so long as it gives them a shot at any of those other things. The main thing that determines whether they do it alone or join a group is how sociable they are.
Imagine an immigrant. Doesn't matter where he came from, but now he's surrounded by fabulous first-world luxuries (and fabulous first-world women). But he can only get shit jobs and he doesn't speak the language so of course those things are denied to him. And maybe his culture doesn't assimilate well, but maybe his host country hasn't made an effort either. And this man lacks the historical perspective, and he doesn't really know what he wants, and it makes him really vulnerable to anyone offering a brotherhood, a purpose, and share of the booty.
That's what I mean about restructuring society. We wouldn't have it so bad if everyone had the same opportunities to prove their worth.