If there's anything I've found in my travels around the world, it's that while religions and cultures may vary wildly, people are really all the same, with the same range of good and bad, the same range of intelligence or lack thereof.
One thing I learned one should *never* do is to insult one's race or religion. Most French may not give a tinker's damn about someone else's religion...but that religious person certainly does. For the truly religious, it means much more to them than race or nationality. Insult their religion, and you're asking for trouble.
So if you want to go ahead and insult someone's religion, sure - it's legal...but the fact that it's legal doesn't make it wise or prudent. In this case, it's inflammatory, asking for trouble.
In other words, just because you *can* do something does not mean that you *should* do that thing. The same principle applies everywhere else on the planet. It's not a culture thing, but a human thing.