Erdogan is of course an insecure and manipulative guy who likes to get back at anyone who mocks him, but he's also quite smart to be aware of and to use the legal options that are available to him in Germany as well as in Turkey. If you don't like it, and supposedly uphold liberal values, change the laws. It's as simple as that.
I think that is a good thing, especially with rise of anti-semitism in different parts of the world.
Ridiculing the Holocaust or any other Genocide is not a free speech, it is a hate speech.