I don't mean to say that perceptions of weakness or actual weakness don't matter in the calculations of leaders. North Korea is, however, a fairly unique case where its threshold for risktaking is abnormally high. Most other countries would expect that the costs of such provocations or at least opportunity costs from foregone benefits would make such provocations unacceptable. However, in Pyongyang, the concept of opportunity costs (foregone economic assistance, foregone benefits from regional stability and cooperation, etc.) are not a part of the regime's calculations. In part, this is because of its ideological commitments to Juche and Songun. Under Kim il-Sung's Juche, North Korea adopted the mentality that it needed to be self-sustaining and dependent on no other state. In reality, that isn't really the case, but the dictatorship believes it is. Hence, with that perspective, the benefits of cooperation and foregone costs for failing to build cooperative relationships are essentially perceived as irrelevant and non-existent. In that context, it is no surprise that North Korea has not found a broad range of proposals that would allow for economic development and large financial assistance sufficiently attractive to shift course. Under Kim Jong-il, North Korea also embraced the idea of Songun, which entails a powerful military-centered society. North Korea believes that the combination of its large conventional forces (even as its weaponry is remarkably dated in some cases), large amount of ammunition, and small (maybe growing) nuclear arsenal provide it with a near absolute security guarantee. Hence, it is willing to engage in all kinds of provocations, sometimes with weaponry, as it feels that it is immune from any meaningful consequences.
Nevertheless, despite the ideological barriers that preclude fundamental changes in direction in North Korea, the one thing that has sometimes restrained the regime is the temporary cut offs in food and medicine. Unfortunately, the U.S., South Korea, and Japan have not shown much appetite for maintaining a prolonged, multi-year embargo on such assistance. Hence, the assistance is quietly resumed after a pause, and the one strategy that can inflict costs on the dictatorship is brought to an end. Afterward, the stage is set for fresh North Korean provocations.
Now, I am well aware that some would make the argument that cutting off such aid would impose great hardship on North Korea's people. The reality is that the dictatorship already deprives them of such assistance, diverting a disproportionate share to its troops and others who help it maintain its power. North Korea's largely manmade famine during the 1990s highlights the extent of its willingness to sacrifice its own population for the sake of sustaining the people and institutions that allow Pyongyang's dictatorship to retain power. Hence, the marginal impact of such a decision would fall mostly on the dictatorship and its enablers.