Saying "bad joke" when someone doesn't get the humour is usually meant as politeness - conceding that you told a bad joke is seen as more polite than drawing attention to someone for not having understood it. I do understand the frustration at not knowing why I didn't "get it", and embarrassment that I think I should have done, but in reality, when someone concedes "bad joke", I think it's usually intended as a kindness by implying that their joke was so bad that it was easy for anyone to miss the humour.
_________________
When you are fighting an invisible monster, first throw a bucket of paint over it.