You realize North Korea can't take a dump without China saying so, right? I'm not sure what is China's angle on this but for starters I'm guessing to make the US look like the aggressive buffoon (again) and 'at the last moment' Russia and/or China will solve things diplomatically. It's possible China got tired of having a PR nightmare on their backyard and want that cleaned up.
Edit: Worldwide condemnation and sanctions could be the first steps to a Chinese-controlled change in management over at Pyongyang, hopefully one with a more open model.