So, Why did China want Trump to win the election?
They didn't.
If someone told you that, they are lying to you.
China did everything they could to avoid that and they knew that Trump had more punishment up his sleeve for them if he got re-elected.
They DID NOT want that to happen.
Again...don't believe the liars.
Trump's tariffs hurt China badly as I know well doing business in China as I have done since 2008.
Trump's China's tariffs drove a lot of companies out of business and a lot of beaten down businesses out of China to more stable countries, such as Vietnam, Taiwan, Laos, Thailand among others that have better and calm relations with the US.
Although the CCP DictatorTyrants in Beijing knew very well Trump hurt their economy they wanted Trump reelected.
The overriding reason was that Trump (and his supporters in USA) were solely and single handedly accomplishing Beijing's number one foreign policy strategic objective of the past decade, ie, to separate U.S. allies from the USA. That is, to demolish the US carefully constructed system of USA alliances post WW II, since 1945.
Private enterprises in China got hammered by Trump's tariffs because they don't have access or the protection of the state owned banks, which is all the banks and that the state operates. Private entrepreneurs in China have always had to use the Shadow Banking system which means I the entrepreneur lend you money as an entrepreneur outside of the banking system. Your father and your uncle lend you startup money or expansion money, upgrade money, and so on. It's all personal and private.
Trump's tariffs hit state owned corporations but they can handle it and did get through it despite being bruised and banged up. Post Trump private enterprise in China is so depleted and shorn Xi announced two years ago the state is taking over all private enterprises to save the production they do, that the economy needs and to reestablish needed profit flows to the state.
So while the Party-Government suffered domestically under Trump their survival and viability weren't ever in doubt. Which left the CCP Boyz in Beijing wanting Trump reelected so he and his supporters in USA could finish the job of destroying and demolishing the U.S. global system of military alliances, trade agreements, historical bonds, stability and so on.
During all this it also became clear to Beijing that it doesn't matter for the CCP Boyz any more who's president because their good times are over. Indeed Biden knows well Xi Jinping is by his own choosing the new Mao who wants to out Mao Mao and to hell with Deng Xiao Ping whose approach was much more low key, long term, subtle. Xi wants it now and he wants it all during his lifetime which is why Xi made himself emperor for life.