"so obviously it's not the religion that's the problem"

It isn't an either/or. Neither religion nor politics is a sufficient condition, but both together are.

Retaliation based on the notion that the infidel West is "attacking Muslims", and therefore it is incumbent on Muslims to avenge their "brothers", is based on the religion. No one except those radical Muslims was interpreting the western interventions as being against Muslims qua Muslims.  They are against dictators, or some radical factions, in what is an already religious conflict-ridden region of the world.

No Buddhist ever retaliated with terrorism against civilians in the US for US intervention in the internal conflict between North and South Korea, or North and South Vietnam, because the US was "attacking Buddhists"....

The Muslim religion provides a handy justification for disgruntled young people in a way Buddhism or Christianity does not.