If North Korea behaved, made peace with the south and corrected its disgraceful human rights record then maybe it wouldn't be sanctioned?
You mean like how Iran behaved, signed up to the JPCOA and got sanctioned anyway? Or how they behaved and agreed to give up all HEU and got attacked by the US and Israel anyway?
North Korea largely exists because the Americans deposed the chosen leader of Korea post-Japan, Lyuh Woon-Hung - a man still revered in both Koreas - because he was a communist, and the newly independent people of Korea choosing to become communist, like their neighbours China and Russia, was deemed unacceptable. The US military stepped in, forced him out, instituted the 38th paralell and then banned communism in the South and put in a dictator who killed tens of thousands, sent hundreds of thousands to re-education camps, enacted several massacres (look up Jeju Island) but looked after US interests.
Iran has been under continuous sanctions since it's people decided they no longer wanted to be ruled by a US appointed tyrant who killed hundreds of thousands of them, didn't even bother spending money on things like running water or electricity for most of the country, and siphoned off all their natural resources to his own pockets and US companies.
Both of these countries are aggressive and defensive, and isolated from the rest of the world where tyrannical regimes can survive because they were under attack from their inception because it was deemed to not be in US interests.
That is why they want what has proven to be the ultimate deterrent from being invaded.
Then we in the west look at these regimes we created and tried to stamp out and ask why they can't just behave like everyone else.
Both are shit regimes that commit crimes against their own people, but god knows there's been plenty of those in the last 100 years who didn't get invaded, and weren't closed off to the rest of the world so that eventually democracy could seep in.