To most its not a good deal. To US companies, that are driven by quarterly targets then it is very much a case of sacrificing the future for the present. And if they stay out of China then the odds are that hackers will either steal the info anyway or another western competitor will play ball.
There's just no way to stop this happening as I see it. The best non-US companies can do is negotiate an equity stake in their local partners and hope the government doesn't pass laws to take it away.