Generally these things follow a Kuznets Curve where you get rich from polluting and then are eventually rich enough to care about poisoning your children.
China's bad air around the time of their Olympics is pointed to as being a turning point that could have toppled the government if not dealt with.
Slightly uniquely they seem to have discovered a way to become even richer by cleaning up their pollution, the timing for EV and renewables working out well, and presumably many other nations will try to follow that pattern going forward.
Even just buying these things from China will make both sides of the trade richer compared with dirtier alternatives.