They don’t ‘prefer’ Taiwan, they prefer Taiwan’s microchip production capacity.
You are right, there are no ‘good guys’, but what are the intentions? For China it was to lift a country out what basically still was agrarian feudalism and colonialism, or Taiwan; to maintain their own power and hegemony at the cost of its people that governed? Yes China fucked up and a lot of people suffered, but unfortunately that was the normal reality in China for the time like it or not, this was a country used to civil wars, famines, and the UK getting it’s people addicted to opium. China has gone through a lot in 70 years but the average Chinese person would be far better off now.