In a typical joke, expectations are set in a certain line. The joke deviates from the line of expectation in a humorous way. But what makes it funny? I think it’s a contrast between the expectation and the reality of the joke.
So instead of what may be a negative line of thinking, the story takes a turn, to something unexpected, to something lighter.
As a listener, the expected stress of the story grows. So in looking forward there is value in having more time to react. Comparing future realities is paramount. So the slower time is for the listener, the more they can compare. So the body physiologically adapts to a stressful situation. But as it turns out, there was no need. The story allowed for an easy out.
The air that was trapped to compare realities is no longer needed. And thus, is released. Time is slow, then fast. Unpleasant, then pleasant. The sudden change of future, from negative to positive, from dark to light, gives the listener relief, in an audible adaptation to a better future.