Please look at the original image on the right in this link. Here are the outputs without and with class wise nms.
Without non-max suppression per class
With non-max suppression per class
The 2nd approach is better if we consider a custom yolo model developed for detecting if someone is carrying a prohibited item in an airport. If someone was to hold a disallowed object in front of their body, the 1st approach will fail to flag the person.