Censorship is not defined as illegal speech. Some forms of censorship are perfectly ok, like when you remove objectionable content from your own platform. If the government were to require you to remove that same content, it would still be censorship, but in a much worse form.