It's more complicated than that. Private companies can censor to a degree, yes.
However, online platforms who are intermediaries are protected legally under 47 U.S.C. § 230 which states they cannot be held liable for content published on their platforms because they do not determine what to publish or not to publish, thus they are not a publisher, which is a private company who can and do censor what their journalists write. A publisher is not protected by this law.
Engaging in censorship, not to be confused with moderation or restriction on certain content (hate speech, phonography, etc..) which is restricted by law, is engaging as an editor, and that makes a platform a publisher under which the forgoing regulation would not apply.
You can censor your platform, then you are a publisher, or you cannot censor your platform, in which case you are an intermediary.
The former is not protected under 47 U.S.C. § 230, the latter is.
The point being, these platforms would not be able to continue to exist without 230 protection and this is why they have strict rules and policies on censoring content, they don't want to be labeled as publishers. As such, they really cannot censor if they whish to be covered by favorable regulation.