I'm not sure how good an argument/excuse this is, but do remember that the country was technically at war with North Korea all this time, and under very real military threat.
Treating occupied enemy territory the way that Israel has treated Palestine violates international law in so many ways it's frankly ridiculous. They really are acting like a military dictatorship.
I haven't been to Gaza, but I grew up in South Korea in the 80s. If half of what I see in the news is true, how Israel treats people of Gaza is much worse than how South Korea treated people of Seoul in 80s.
Put another way, I'm sure even Pyongyang has some happy citizens. Even dictators usually let some local population live happily. The trick is being part of the right local population.
Containment as a foreign policy led to extremely bad outcomes globally, as did colonialism. It wasn't just SK treating it's citizens poorly, it was the vast majority of second and third world countries that had a history of colonial subjugation. Looked through the lens of colonialism, it makes perfect sense.