I think it will cost them financially though. This won't come cheap. Half a trillion for about 1200 GW of capacity is a lot and not necessarily the best value for money. However, they have about that amount of coal to replace as well. The issue with wind and solar is that we're only adding in the order of a few hundred GW per year. China needs an order of magnitude more just to get rid of coal.
The interesting thing will be if production capacity for wind turbines and solar panels will grow quickly enough to make this investment unnecessary. One order of magnitude increase in production capacity would do the trick. Not trivial; and China is already going as fast as it can with this. But also not impossible. It's going to be a close race.
China might simply be betting on multiple horses here; which is the smart thing to do. I don't think they are picking winners here; just losers. Which would be coal. It needs to go, hence the need to fix 1000+ GW of power demand while also accounting for continued economic growth. They aren't ready to commit to that at COP 26 just yet. But the timing of this announcement is no coincidence either.
Another horse in the race would be fusion. Apparently there is some serious money flowing into some companies now. Helion just did a 500M series E: https://techcrunch.com/2021/11/05/helion-energy-will-use-500.... That may or may not work but it's kind of a really big deal if that hits commercial viability this decade rather than in 2050. And as the US has less of a coal problem at this point (most of it will be gone by the middle of this decade), nuclear is less urgent as a solution. And unlike nuclear, fusion actually might have a shot at being cost competitive with other renewables. Helion is pitching 0.01$/kwh. That's the right level of ambition here.