One big reason renewables became so cheap is because around 2008 Beijing Olympics, China decided that they were done with air pollution in the cities. IIRC at that time coal power and other industrial production had to be stopped for a couple of months in the surrounding provinces to make the games happen and people (importantly top bureaucrats who lived in Beijing) decided they liked the clean air.
China doesn't have any substantial deposits of fossil fuels that give get clean air (like gas that US has) and Oil and Gas has to be largely imported leaving them at the mercy of international market prices and currency fluctuations. So they started heavily investing in renewables production capacity, first in wind (China's installed capacity started doubling yoy around then) and then Solar from 2010/11 even if they were expensive then and it wasn't clear how much of a learning rate benefit there would be. Similarly massive electrification of public transport and introducing subways later in the decade again to reduce pollution in the cities. Now i believe they have 3X the installed base of the next biggest country (US) and still accelerating.
Later on the Paris Climate treaty just added extra momentum with the climate change and carbon reduction angle. But it was originally a political decision that took political will - to get cleaner air in the cities even at a possibly higher cost.