You can't expect everyone to find something funny.
Matt just started a new job and is at a happy hour with some of his new coworkers.
Matt wants to impress one of his female coworkers.
Matt approaches the female coworker he is interested in gets to know her personality before making a joke tailored to how he perceived her to be.
Matt makes a crude joke in front of the entire group that he thinks everyone will find funny.
The female coworker loves Matt's joke, and they spend the rest of the night flirting.
The joke offends the best friend of the female coworker that Matt wants to impress, ruining his chances with her.