In dictatorships, these regulations and bans exist for the rulers to control the people and rule till they die.
In Western world, however, these laws are enacted to be able to know who sad what and when. Our own world is changing, and growing issues require to either admit very major mistakes our politicians keep making, or to silent them. Because it is not enough that an idea or an opinion is banned, they want to see everyone who refuses to let it go.
The "I can see what you say every minute" is enough to deter many from expressing ideas or thoughts that are appointed to be forbidden. But since these very ideas are a result of societal issues, they cannot just die. As some problems keep growing, these ideas find more and more followers. By trying to deanonymize people who promote and spread these ideas, the Western governments hope to at least limit "the damage." If I know who said it, I can try to punish you when the time is right, or when the society is conditioned to accept that these things should not be legal.
At the end of the day, not dealing with problems (even those that are declared nonexistent or holy) only increases the desire to speak and look for solutions.
The scariest thing to me is that we already have many officeholders that do not hesitate to call white black or the other way around and accuse those who refuse to agree of all the sins except for law breaking (for now). To not have privacy to accuse them of lies or deceit is something they would very much want. Look at the cities or entire countries with very strict or outright bans of weapons, firearms and cold. It does not help. The only thing they can boast of is that the crimes are committed other ways. Yeah, we did it guys, guns no loner kill people. Grenades however... They failed and keep failing because most of restrictions do not fix people. And to these people, the idea that we have to do something with the PEOPLE is terrifying. It points exactly at the problem and at the people who 1. failed to acknowledge it, and 2. fix it.
In brief, nothing good comes from these restrictions, especially since they are not designed to fix something. They are purely designed to give the political establishment more control, control over speech, and the ability to track and punish those who express forbidden ideas. I did not say "unlawful" because we are still where these opinions and ideas are called wrong, evil, racist but still not unlawful.