Let's not forget that Ukraine also gave up their nukes, and Russia promised to protect them... Look what happened there.
North Korea is a small country with a relatively weak military, who have either lost or are in the process of losing their powerful allies. As it stands, a conventional war between north and south korea would end very swiftly in defeat for the north especially if america got involved on the south's behalf and right now pretty much the only thing stopping this from happening is china, and it doesn't look like the chinese will be backing them for much longer.
On the other hand if they have nukes and are able to deliver even a small number that would make any aggressors think twice about attacking because even though north korea would still ultimately lose, there would end up being significant losses on both sides and neither the us or south korean governments would be able to justify this to their people.
The north is highly unlikely to ever strike first, because there is no way they would ever be able to hit hard enough that there wouldn't be a severe response. They might be able to blow up a few cities, but then they would have america attacking them back in full force.
Let's also consider the economic sanctions imposed on north korea, they don't hurt the regime - there are still plenty of black market channels through which kim jong un can obtain his imacs and whatever else, and the lack of open trade/communication is helping the regime keep their people away from foreign sources a propaganda. Meanwhile the negative attention and threat has caused them to spend a disproportionate amount of their budget on the military in order to defend themselves.