Why does North Korea even need a military or any kind of defense? China is not going to allow anyone to invade and take over NK. That's already been proven.
It depends on interests, Take the last Georgian-Russian war for example, Georgia is not rich of resources, and somehow not a very strategic location on the map for the NATO so they didn't help Goergia.
Take Israel in the other hand, Strategy and Money protected that small colony.
Iraq-Kuwait war, Resources first then Strategic location.
Taiwan-China crisis.
Notice that the western nations helped Israel to build it's own nuclear warheads so if there is a war between Arab and Jews it will be Arab-Israel war not a direct Western-Muslim war (kill each other we are out), But even though the western nations will not let their most important colony fall.
There are allies that you can't let down and the opposite, It always depends on interests.
NK helped by China and Russia against the US, Japan and SK so to avoid the direct involvement they helped NK to build it's own nuclear weapons, At least if a war happened the Big players won't get too much damage.
this is the big players game, So the other players for example SK, Will not rely on anyone else to protect them because it's a matter of interests which means a matter of time before the big daddy get better offer.
This is at least my own point of view.