The joke is a pun.  The phrase 'dirty cop' tends to mean a corrupt police officer.  In this case, the officer doesn't bathe except for one day every year, so they are literally dirty.
Officer Jones takes his yearly bath every June . He is a characteristic example of a dirty cop .