Acquiring nukes seems like the best way for any country to protect themselves against outside interference.
We know that as soon as Gaddafi decommissioned his nukes, Libya was targeted and invaded. If Iraq actually did have nukes, the USA wouldn't have been so brazen to invade.
China, Russia, and North Korea's acquisitions of nukes are also some of the main reasons why they are not easy targets for direct US invasion.
If Iran had nukes, it would drastically limit Israel's ability to indiscriminately attack Iranian assets.
Western policies against nuclear proliferation always seem to target the countries that need them the most to ensure national sovereignty, and never refer to their own nukes.
For example, they always fearmonger about "rogue states" like North Korea getting nukes, while being perfectly okay with Israel's own nukes. It might be best if these policies are ignored entirely.
I think that the DPRK's military acts as a deterrent as well, probably more than anyone expects. And while I take the U.S. projections relating to military-related shit with a mountain of salt, I'm not sure the DPRK's military could "win" against the U.S. military, given the significant funding, material and technological advantages.
Though I am aware that the DPRK's military wouldn't be helpless, and the U.S. would suffer massive casualties.
Win or lose, I still think it's enough of a deterrent to keep the US from attacking, which is why the US didn't invade to prevent the DPRK from achieving intercontinental capacity in the first place. It seems clear to me that nuclear weapons came long after such a war was untenable to the US. Until I see a serious downsizing of the Korean People's Army I'm going to be unconvinced that nuclear weapons actually matter.