Humour may have evolved like peacock feathers – to attract mates. Not only is wit a sign of a healthy brain, but throughout history mockery was risky, so jesting could even be considered a Zahavi handicap. Humour as a mating signal might also explain why ~95% of comedians are men
On average, women actually appreciate humour more than men (although men tend to have greater facility with comedy). Your second point is interesting, and may well have some truth to it. https://www.sciencedirect.com/science/article/pii/S0160289611000523 …