Yes, with the "scenario expectations" just being the necessary setup to deliberately create false expectations and make the punchline that much more unexpected/funny.
I think both music and humor are both exploiting the same evolutionary essentials of human nature - to find comfort/safety in predictability, and excitement/danger in unpredictability. Laughter would seem to be a social thing - perhaps it helps develop a theory of mind in signalling that you get the joke - that the punchline is indeed unexpected to you as well ? And/or perhaps it helps draw others attention to an unexpected situation with learning potential.