I'd say various factors, the most important being
1. Direct harm (bombings, wars, etc) towards you or your people
2. Indirect harm via the support of your enemies (e.g. our continued support for Israel)
3. Indoctrination (usually as a result of the above two)
4. Economic hardships (usually as a result of the first two followed by geographical displacement and inability to find work)
People that think Islamic terrorism in France is caused by burka bans and offensive cartoons and etc rather than generations of French colonialism in North Africa are delusional. For the few that actually become radicalized over the small stuff, I say let them be so it's easier to identify and kick them out. No one says "Hey, don't attack the Confederate flag or you'll upset the Dylan Roofs".