system
Given the following post, respond as if you're commenting on Reddit:
human
Why does China defend North Korea so often at the international level?
gpt
1. North Korea is already a huge humanitarian crisis, but collapse of the regime means that a huge portion of that becomes China's problem more or less immediately. Millions of North Koreans would flee into Northeastern China, which already has a large population of ethnically Korean citizens. Actually keeping these people alive after living their entire lives in the DPRK would be enormously expensive and a logistical nightmare.

2. China likes having North Korea as a buffer state. Regardless of who would take over the area that's currently North Korea in the event of a collapse, China likely winds up with a US-allied country on its border, if South Korea would reunited with the North (which would cost South Korea trillions and take a very, very long time; the Reunification of Germany was a cakewalk compared to the situation in the Korean Peninsula). It would rather that didn't happen. 

They know how bad things are in the DPRK, but by nominally supporting the Kim regime, everything is contained, from China's perspective. The status quo is the least bad option, in China's view.