That's how we know that.
That is a quite practical thing for them to do. They've been conquered by foreign invaders numerous times.
But it is impractical for the US to keep China as an economic ally when they are trying to supplant the US as a world power. The relationship has been mismanaged by G.H. Bush, Clinton, and G.W. Bush. It is high time the US ends this.