Because the Chinese are openly hostile towards the United States and its interests, whereas American companies have a vested interest in the U.S. and are beholden to its laws.
I don't know why realpolitik is so hard for technologists to understand, perhaps too much utopian fantasy scifi?
The idealist and optimist part of technologists tend to block the understanding of the rather simple practicalities at play in geo politics.
It is really amazing to see so many replies here of people who do not just disagree with the ruling but completely deny the principles at play exist.