Foreigners buy US treasuries to keep their currency in a position to keep their exports flowing to the US. If the consumer falters in the US, I assume China would stop purchases of US treasuries, but they have another reason to do it: they already own so many that if they stopped purchasing more, what they already own would decline greatly in value. Their position is too large for them to exit. Both the US and China are backed into a corner together. This won’t end with China continuing prosperity if the US consumer backs down. Both countries will suffer consequences when the game is finally up.