China used to back Khmer-Rouge because it would counteract Vietnam.
The little riceball in Pyongyang doesn’t bother the Beijing regime as long as they keep him pointed away from them.