I first read this story in an Isaac Asimov book. It was supposed to be the originator of the term a shaggy dog story. That term is used to describe any anecdote that draws people in on the presumption that it’s going to have a witty ending. It then rambles on, keeping people waiting, till finally, the audience begging for mercy, it ends with a weak pun. I happened to like the wordplay in this one so it stuck with me even though I must have read it a good 35 years or more ago.