* Making sure everyone loses a MAD nuclear war
* Maintaining undisputed naval dominance in five oceans.
* Bombing people on its imperial adventures all around the world.
* Offering security and protection in exchange for military and economic and political obeisance from its vassals and client states. [1]
North Korea spends much of theirs on artillery shells, because it's military priorities are, in decreasing priority:
* Make themselves unattackable due to its small nuclear arsenal.
* Make themselves unprofitable to attack, due to holding a conventional-artillery Sword of Damocles over South Korea's cities.
* Being able to resist a ground invasion along a clearly-defined border.
It doesn't maintain more than a mothball air force, and a rag-tag brown-water navy, because both will be blown out of the sky, or the water within days of a shooting war breaking out.
It turns out that air forces and navies are very expensive to operate. Artillery, not so much, any asshole with a basic understanding of a lathe and undergrad chemistry knowledge could conceivably run a munitions plant.
---
[1] The promise of security and protection turns out to have been written on tissue paper, because it can't even defend its own assets in a shooting war with a bankrupt regional power.