Hacker news also bans people merely for being rude, even if they don’t post illegal content. If you have a principled objection to this act you should delete your HN account and leave.
I'm not sure if that is a great analogy for what Twitter et al. are doing in regards to content policing, but there is some kind of argument there.
For example, Internet services which host user-generated content might be able to retain liability protection only if they also provide some reasonable degree of transparency and accountability. Clearly document their editorial policies and algorithms, and provide a formal appeals process for users who were censored.
Only the ones that act like publishers, curating the content they allow and disallow. The ones that behave more like the telephone or postal system would not have the liability, right?