It is the difference between the jokes you make within a group and those that go out to a wider community. As a child in a catholic home I can rememberthat the best anti-catholic jokes were told by priests, but only when within a small group of friends, all catholic. I think the same about Joan Rivers, as a jew, of course she can make jokes like this, but only within her close Jewish community.
Most communities, police, army, teachers, will have a form of black humour shared between the group that helps to deal with the stresses and problems they face professionally, but this humour can and will be misinterpreted if repeated outside that group