What on earth has sharia law got to do with anything? We have the code civil and that is that. Religion, of whatever sort it may be, is a private matter and we don't allow ostentatious displays of belonging to one or another in the public sphere, which most of us think is a good thing.
If you are thinking about Muslims, specifically, remember that they are French people who happen to be Muslims and constitute 6% of the population (like Catholics in the UK) which is hardly a big deal. We should actually be asking ourselves why they are dissatisfied, why some young people think radicalisation is cool and glamorous and worth it, could it be that the 94% blame everything on their being Muslim rather than on the fact that anyone not 'français de souche' gets it in the neck for délit de sale gueule. Xenophobia again.
As for the UK, seen from outside, the underlying and frequently overt force driving the Brexit campaign was insularity, and again, xenophobia, especially with reference to immigration, and looked a lot like cutting off one's nose to spite one's face. An awful lot of the people who voted to leave, not all but many - and they were the vocal and visible element, did come across as "xenophobic, racist, uneducated etc".