China is doing this for energy independence. Their fossil fuel supply chain is critically vulnerable. They don't care about the climate, but will happily play the optics.
China actually has quite a bit of public debate and discontent around air quality at a minimum. They definitely care in that they don’t want to piss off the populace.