http://foreignpolicy.com/2017/04/26/kim-jong-un-is-a-survivo...:
"While North Korea’s nuclear program is defensive, it still makes sense to remind the world about its existence and use what President Richard Nixon once described as “madman strategy,” that is, to appear to one’s opponents to be irrational, volatile, and willing to disregard costs. That’s why North Korean propaganda uses such fiercely colorful language. When North Korean TV promises to “make Seoul into a sea of fire,” or threatens to nuke Canberra, or shows Kim Jong Un in front of a map of the United States with cities marked as targets of nuclear strikes, they are delivering the same message: “we are here, we are volatile, and will stop at nothing if our opponents do something threatening.”"
Madman strategy has a Wikipedia page: https://en.wikipedia.org/wiki/Madman_theory, which states Machiavelli wroet sometimes it is "a very wise thing to simulate madness"
That's better than just full crazy all the time, which as you say, might draw a more dangerous response from your opponents.