This phrase means that police officers often display a very dark sense of humor, even when they are dealing with death. They make jokes that other people may find inappropriate, but they make them in order to cope with the difficult job they have to do.