Free trade generally does not mean you have to let foreign companies operating in your country do things that domestic companies are not allowed to do.
Most of those sites are not in China not because China says that they cannot operate there but rather because China say they would have to obey the same rules Chines companies do. That generally involves things like storing data on Chinese citizens only on servers in China, censoring things the government wants censored, and giving the government easy access to information including identifying information to unmask anonymous posters.
This is post hoc nonsense. China blocked US tech companies so that they could copy what the US companies do without any threat of superior competition.
Most of those sites are not in China not because China says that they cannot operate there but rather because China say they would have to obey the same rules Chines companies do. That generally involves things like storing data on Chinese citizens only on servers in China, censoring things the government wants censored, and giving the government easy access to information including identifying information to unmask anonymous posters.