Partially a buffer. All the nuclear and rocket technology, parts, and expertise North Korea has came from?  China. NK is just part of China's proxy war with the U.S.  It's just a distraction to China's long-term hegemony in the Pacific. China's string of military installations built on artificial islands, their military confrontations in the China Sea (China's territory per Beijing), buildup of their navy, etc. are all part of their long-term objectives to dominate the China Sea and a huge swath of the Pacific. 

China's Pacific policy and pan-Asian policies are eerily similar to Japan in pre-WW II. China believes all of Asia will be under the "umbrella" of China. Same as Japan in the 1930s. War with China is either inevitable or avoidable. More bets are being waged that it's inevitable regardless of who occupies the WH.