Sorry in advance for my incredibly amateur attempt to explain this. I have absolutely no music experience but I have noticed that one of the key to a catchy song seems to be this practice. More accurately, the catchiness seems to come from causing the listener to expect one sequence of notes and then surprising them with an entirely different set of notes.

In many songs, a musical pattern is established; a simple sequence of notes that is repeated multiple times.

Take the following sequence of notes. The listener "expects" another E but gets an F instead:

C D E C D E C D E C D F

Sometimes this is more complicated and the expectations are only violated based on what the listener expects, as in:

3 Answers
3

Here are a few examples (Not classical or mainstream jazz since they are completely based on variations anyhow)

Taking a cue from one of your sentences, I would recommend this video from the comedy-rock band Axis of Awesome (mostly known for their 4 chord song) mocking the key shift usually appears in commercial pop songs (the relevant part starts from 2:35).

Another nontrivial example (that I can think of right away and that would make an example in this context without being too complicated) is from the song "Learning to Live" out of Dream Theater's Images and Words album. Around 7:40 the keyboard sets up a riff and then cues for a slight increase of tension and together with the lead guitar, perform a long variation around this theme up to the guitar solo and return to a similar pattern until the vocals come in.

And of course my personal favorite is Vinnie Colaiuta's (or the band Karizma's) song "I'm Tweaked". The song is based on disturbing the listener's 4/4 beat feel here and there with having some instruments playing straight 4/4 but in the meantime having the drums occasionally shift back and forth a 16th note.

Music theorist here. I'm not aware of a blanket term that covers violation of musical expectation. "Symmetry breaking" is pretty good for the cases you describe, but there are lots of other ways in which music creates, meets, and denies expectations. For example:

A wrong note inserted into a familiar tune (e.g., "Twinkle twinkle little star") violates a very specific expectation that has little to do with symmetry.

Music in a recognizable style or genre inherits expectations from its forbears.

Repetitive patterns can imply multiple continuations, in pursuit of different goals. In "Twinkle twinkle," does the initial upward leap set the expectation for continued upward motion (plausible enough; compare the opening of "Also sprach Zarathustra" or the refrain of "Do you hear what I hear?"), or does it imply a corresponding descent (as happens with "how I wonder what you are")?

Well, when you follow a G7 chord with an A minor chord instead of the expected C major chord, that's called a "deceptive cadence". That's the only example I can think of where there is a name for something that breaks expectations.