It's that way in most EU countries.
It isn't really about punishing stupidity though. Imagine the period just after the second world war. Millions in Europe had died, the entire continent lay in ruins. Everyone in Europe was still scared the Nazi's would somehow resurface, and win the second round - like the monster in a bad horror movie. To prevent that from ever happening, many pieces of nazist/fascist thought were banned entirely.
Later, it became almost impossible to change such laws, since almost everyone in Europe had lost family members in WWII - changing laws like that would feel like "becoming accepting lenient of fascism". And, of course, apart from how that would make survivors feel like their dead family had been forgotten, everyone was afraid that it would be the first step toward forgetting what had happened.
Now, the EU bill proposed by France is something different entirely. Basically, it's a reaction to Turkey's persecution of those who say a genocide did happen. With Turkey still (roughly) on the path to joining the EU, and a majority of EU citizens opposed to that, politicians consider it essential to make some strong demands of Turkey if they are ever to join, and to give a clear signal that Turkey isn't just "getting in for free".
Personally, though, I think that people should be allowed to be as stupid as they want to be... their ignorance is much more easily exposed by allowing them to speak freely than by banning their ideas.
__________________
/(bb|[^b]{2})/
|