Because they have nuclear weapons. Imagine the disaster of the Vietnam war, but with a couple of USA cities obliterated by nuclear warheads.
North Korea would be leveled wall to wall with air strikes if this ever happened. And kim knows this.
North Korea was already leveled wall to wall with air strikes. That’s why they’re behaving this way, because the USA already demonstrated that they were willing and able to bomb the entire country until there were “no more targets” left to bomb and the Korean people needed to start living in caves to avoid the mass dropping of napalm.