North Korea was supposed to be doomed. How did it pull this off?