The reason is the China from the start saw US as a competitor to China's companies (and internal sovereignity, as the US likes to push its political agendas to other nations).
China wasn't seen as a competitor by the US, but as it's outsourced cheap factory - so as they were just that, they were ok. Now that China's companies get increasingly competitive and aim for the global market themselves, the US tries to stop them in various ways from doing business in the US.
("National interests" is a good catch all reason for that, "humans rights" is another good excuse - though when you do business just fine with all kinds of other human rights violator states - not to mention violate human rights left and right yourself -, it's evidently just an excuse).
Same thing when Japan got on the rise and started buying US companies and investing there. There was all kind of nationalistic objections, and in the end they were pressured to sign the Plaza accord, that hurt them to this day.
https://lite.cnn.com/en/article/h_7362899f13ec8816e5dee88b26... According to Lee Kai-Fu who launched Google in China: "Chinese laws are clear about what foreign companies can do to operate in China. In TikTok's case, though, the company was left no choice but to consider a forced sale."
China doesn't routinely ban American internet companies for no apparent reason. The same laws laid in the clear are what the American competitors in China follow. Google proactively made the choice to exit China (it also somewhat didn't. Google ads has a sizable market share in China as does Facebook). This is not to say that I'm suggesting that they should have elected to follow Chinese laws. But it's not arbitrary.
This would be akin to saying the French are savages and routinely ban gun toting Americans from visiting so we should feel justified to ban any French from visiting. Sovereign governments have their own laws.
Both Google and Facebook once operated in China, but after the multiple terrorist attacks, they were unwilling (or unable) to comply with Chinese laws.
That’s why Skype and iMessage are available in China, they comply with Chinese laws.
'Terrorist attacks' from who exactly? When French or Polish resistance members assassinated Germans, I bet the Nazis thought that was 'terrorism.' The Chinese government likes to cry and moans about 'terrorism' from Tibetans and Uyghurs, but the CCP are the real terrorists in these situations. Any American company that cooperates with them are abetting genocide.
The main difference is that the Chinese only have one party -- which means they don't have to pretend their votes matter which might even be seen as an improvement (at least honesty wise).
Let’s be real, the Chinese government only wants to allow internet companies that will allow them to monitor all communication and traffic between Chinese citizens so that they can stamp out any dissent. But dissent and disagreement is not terrorism. It’s both creepy and Orwellian.