I don't think it is true that they necessarily want the US to struggle, I suspect it's more self interest. LLMs seem to be one of the biggest innovations of the last few decades, China probably just wants to make sure it's not being left behind and/or made hugely reliant on the US for what seems to be turning into a piece of critical infrastructure.
China has an effective strangle hold on some key sectors (solar, rare earths) and I am sure they relish this position and the leverage it gives them. You'd be careful not to give away that same leverage to a competing power if you can invest a few billion now and cover your bases.