Its obvious NK is a client state of China and Xi clearly wanted to solve his problem child on his doorstep who is bringing the US/Japan to closer China's shores. Its also a signature achievement for him and will help cement him as a 'great' leader, not just a savvy and bloodthirsty political player.