China is a nuclear power, and that would make South Korea and the US think twice about pursuing a military response.
I'm assuming that China would have been 'invited' in by the North Koreans, which would give its presence there the fig leaf of legitimacy.