Most of the immigrants in France hail from Algeria, Tunisia, Morocco and other North African countries, some of which the French had colonized and who fought the French for independence. Many years ago, the N. Africans who came to France became totally assimilated into the French society. They tended to be the descendants of European settlers and they were more able to blend in. During WW1, and I think WW2, the N. Africans fought side by side with the French. During both wars, the N. African immigrants filled jobs left by the French men fighting the war. The Algerian war was fought in the late 50's & early 60's. Some of my family fought in that brutal war. The French did not want to release it as a department; they considered it part of France. The Algerians obviously begged to differ.
Since that war, there has been a steady stream of immigrants, both legal and illegal, from the former colonies. Most of them are Muslim. They tend to fill the menial jobs the native French do not want (sound familiar?). My family used N. African migrant labor to harvest our grape crops. I am ashamed to say that the racism I witnessed in my French relatives' household was prevalent.
While you can say that the French have been "over-generous" with their welfare benefits, you can also say that they paid this money to try to sweep a very big problem under the carpet. For a long time, they needed their labor to rebuild the country. Over the years, more and more of these immigrants have migrated to the cities, and they have been marginalized and disenfranchised in ways that exceed anything we see over here. For most of these immigrants, assimilation is not an option. The French are very "chauvinistic" in general. The French government just wants everyone to be the same -- to be French. Over the years, the solution was to basically warehouse the immigrant population. So long as they stayed quiet in their housing projects, the French did not see it as too high of a price to pay. Most of the population in these projects is unemployed or employed at menial jobs. In general, unemployment is a problem in France, especially among the young. There is resentment any time an immigrant "takes" a French job, yet the empoyers will say that the French don't want them. The economic issues there are very complex, and it does not help that they have (imho) not had a truly gifted leader in many, many years.
From the cultural and religious side of things, in 1989, issues that had been simmering finally came to the surface when the French education minister decreed that religous garb could no longer be worn to school and several Muslim girls were expelled. This sparked demonstrations, rioting, hunger strikes. There was a lot of disagreement on what secularism really means. Does it mean that we eradicate religious expression everywhere but in church, temple, mosque, home? Or does it mean that we tolerate expressions of religion in society in general? Finding the right balance, as we all know just from the DIS boards, is awfully elusive. Since then, the French immigrant population has seen itself as under attack. There have been many situations that do not make the press here. That this situation has occurred now should come as no surprise to the government. This has been a tinterbox waiting to go up in flames. Sadly, a small, but very potent group of people see no way out of the situation except to fight. It's horrible and wrong, but the desperation is real.
This is definitely a situation in which religion and culture are intertwined with economics. The French are very proud of their culture, for good or ill. They are a complex people and it's hard for us, with a whopping 230 years of history, to understand some of the historical undertones of their politics and society. I know there are a lot of you out there who just viscerally hate the French and look for any opportunity to castigate and mock them but given what's going on in our own country, we'd do well not to throw any rocks lest our glass house come crashing down.