China sees a unified Korea as a threat to their national interests. South Korea has grown both economically and militarily at a rapid pace since the Korean War, making them a significant regional power. Add that to the fact that they are a staunch American ally who have 28,000 American troops and several US military bases in their borders; China makes the calculation that a unified Korea upsets the balance of power in America’s favour.
How much of this is based in reality is something of a question as the primary reason for those bases and troops is because Korea is divided but unfortunately geopolitics is not always based on reason so much as paranoia. That said I somehow doubt the US would pull out all it’s soldiers and bases if Korea ever does reunify so given that Beijing is only 1000 km from Seoul I can understand China’s concerns, but those concerns are leading them and the rest of the world to a ruinous alternative.