It's a rational way to deal with their energy needs, reduce pollution and their impact on the climate.
They have small gas and oil reserves if I remember. Unfortunately, if they were sitting on Venezuela or Russian style reserves or oil/gas the story might be different. But unlike Europe, the Chinese can see that being beholden to foreign states to keep the lights on is asking for trouble.
They seem to have avoided the ideology the big fossil fuel companies push in the west to make fossil vs green a political/class discussion, not a rational one. Rationally it makes most sense for a nation to generate their energy needs in a way they control with wind/solar/nuclear.
It's not small -- China is the world's 4th largest oil producer. They domestically produce about 75% of their demand.