No, the government shouldn't be restricting behavior unless there is a good reason to do so.
German constitutional principles only permit restricting basic rights (this seems to affect free speech, at least in its US definition) if it is "proportional" (verhältnismäßig) - restricting only what is absolutely necessary to reach a legitimate goal.
More specifically, it has to be suitable, necessary, and appropriate/non-excessive ("geeignet, erforderlich und angemessen").
A law that doesn't achieve the stated goal would fail the "suitable" test.