You don't have to be more than reasonably familiar with North Korea in order to understand the game theory at play over there. Kim Jong-un's regime is critically dependent on a two-pronged power source that has to be constantly renewable. Without the constant renewal of these two power elements, he would absolutely be disposed of in what would amount as a military coup, with a side-dish of civil war that would be neutered and irrelevant due to a completely powerless general population:
Fear-based hierarchy: Kim is one man surrounded by hundreds of subordinates operating a political machinery that predates him by two generations. His only legitimacy is generational and this isn't enough to convince the more technocratic-minded of his subordinates to follow him if they're not convinced of his strategic/leadership/military/nation-building ability. As a result, Kim must constantly renew a fear-based motive to keep the hierarchy in check with him as the top. He simply cannot afford to go for a prolonged period without, for example, carrying out "purges", the random public execution of high-ranking party elders that are perceived as some remote threat. The fact that these purges target elders reinforces that nobody in the hierarchy is safe from Kim's wrath (including his own uncle), and their graphical nature (including execution via mortar round) helps crystallize a sensual human fear in people who hear the story and participate in the act. Kim does not perform these purges because he's evil and angry: he does them strictly out of utility. Doing these purges is equivalent to mowing a lawn or brushing his teeth: necessary maintenance to prevent the fermentation of a complicated problem. Make no mistake: if Kim goes for a couple of years without reinforcing this rule by fear, he will allow for an organized opposition to ferment on an intellectual level. This strategy also reinforces that the only path to personal comfort is complete loyalty to Kim, which is always rewarded and the opposite of which is always terribly punished.
Otherization: The establishment and constant rejuvenation of a fear-based hierarchy keeps the party in check but doesn't do much to affect the loyalty of the general population. This is why Kim has to constantly keep upping the ante of his aggression against an "otherized" entity, in this case the United States and its "pet poodle" South Korea. The "other" is an entity that can never be reasoned with because it does not accept reason and that seeks your destruction because of its limitless depravity and ill faith. The threat of apocalyptic war against an infinitely malicious devil keeps the population in check and is exactly why Kim keeps making announcements, each very slightly bolder than the last, about the readiness and capability of his nuclear arsenal, about his very high willingness to invade South Korea at any moment, and so on. Kim has absolutely no interest in ever bombing the United States or even South Korea. This is all simply a survival mechanism that points to a created enemy, directs all negative attention towards it, freeing him to portray himself as the strong leader/hero/savior in whom complete trust is necessary for the people's survival.
Incidentally, otherization is something you'll find everywhere. It dates back hundreds of thousands of years in terms of human evolution and is a fundamental psychology in the survival of tribes. Sadly, it's deeply embedded in the recesses of our brain's architecture. It is exactly the psychology employed by ISIS to motivate attacks against the United States, but can also be seen manifesting itself in situations far less serious, for example Bernie Sanders voters vs. Trump voters, Snowden vs. NSA, Apple fans versus Android diehards... The goal is always to completely strangle and kill the intellectual capacity for nuance. Watch out for thought-terminating clichés in your own daily life -- one of the surest indicators of otherization taking place.