To maximize profit, they utilize hydroelectric power plants built on Yangtze river. Not the ones like Three Gorges Dam, but those small/micro plants (<10MW installed capacity). Most of those plants are owned by local governments or private companies. Usually, State Grid -- which is obviously owned by the state -- would purchase their power output but during rainy seasons, there is just too much electricity that State Grid wouldn't buy it all.
That's when miners came and built datacenters close to the power plants, made deals with the power plant owners to buy the power that State Grid didn't want. It's a win-win for everyone: power plants get extra cash, miners get cheap electricity.
And when it comes to dry season (starting October), miners ship their mining rig to Xinjiang or Gansu, where wind turbines are having a similar situation.