Since the end of the Cold War, and the end of the large subsidies North Korea got from the Soviet Union and China, the North Korean military has depended more on their uniformed farmers. Since the North Korean military consists of about four percent of the population, and mainly conscripts in uniform for six years, keeping the troops well fed also takes care of a significant chunk of the, potentially hostile, population. But, most importantly, the increased use of military agriculture insured that the troops were not hungry enough to rebel. However, in some cases, this meant diverting agricultural resources (fertilizer, machinery, and even seed) to the military farms, at the expense of the civilian ones. Some two million North Koreans have starved to death since the 1990s, and this sort of thing usually creates a lot of unhappy people. But the North Korean leadership has used the food shortages to increase their control of the population. Areas that show signs of unrest, get less food, even if it causes severe malnutrition and starvation. The military feeds itself, and is kept under tight discipline. The secret police and bureaucracy is well fed, and continues to use food as a very effective weapon.
One way the North Korean leadership has maintained control of the country, despite over a decade of famine and the world's harshest police state, is the large number of troops assigned to produce food for the armed forces. Having troops raise their own food is actually an ancient practice. But in the 20th century, the Russian and Chinese communists made food production (mainly farming, but also raising animals) a major part of military life. In this way, these communist dictatorships were able to keep their military budgets low, maintain larger peacetime armies, while keeping the troops busy (and out of trouble). Some of the more enterprising military leaders managed to make some money by selling surplus food to civilians.