China is North Korea’s primary sponsor state. But North Korea is also a problem for China. Kim Jong Un’s saber rattling leads to the militarization of South Korean and potential re-arming of Japan, challenging Chinese hegemony in North Asia.
Meanwhile, as the U.S. antagonizes North Korea, if China plays a role containing them they gain prestige on the world stage — equal to or in excess of the United States.