Another part is that they are probably replacing dirty, inefficient, old plants with more economical and efficient newer ones. The less efficient a plant is, the more pollution it creates and China has huge issues with smog.
And of course a lot of the plans of even a few years ago are getting obsoleted by rapidly the changing facts of renewables scaling faster and cheaper than anticipated. In a way, they are a victim of their own success here as a lot of the renewables industry is happening in China.
The theory that coal plants are going to be used as peaker plants makes a bit of sense as it means they won't have to import expensive gas and build new plants for that. My guess is that they will use more coal in the winter than in the summer when they have more solar on the grid. But it's going to be some time before they can stop relying on coal completely.