Short answer: because your brain treats catchy music like unfinished business. A song gets stuck in your head when it's simple enough to sing, recent enough to be loaded in memory, and your mind has nothing better to do. Scientists call it involuntary musical imagery, or INMI, and it's so common that Victoria Williamson and colleagues have spent years classifying it as its own distinct, mostly harmless mental event. It's not a glitch, not a symptom, not proof you're losing it. It's the norm.
The slightly longer answer is more interesting, because an earworm is a tiny daily demonstration of something most of us don't like to admit: a lot of what runs through your head was never something you decided to think. You didn't choose the chorus. You definitely didn't choose that chorus, the one from the ad, the one you'd swear you hate. And yet here it is at 2am, playing the same eight seconds on loop while you try to sleep. According to the Cleveland Clinic, nearly everyone experiences this, and usually it's exactly that: a fragment, a hook, a sliver of chorus, almost never the whole song. Your brain grabbed the catchiest piece and lost the rest.
What makes a song sticky
Not every song has earworm potential. Kelly Jakubowski and colleagues ran a study charmingly titled "Dissecting an Earworm", comparing songs people reported as stuck against similar songs that weren't, and found a recipe. Earworm songs tend to be faster and more upbeat. Their melodies follow a common, easy-to-sing shape, the kind of contour a kid could hum on first listen, but with a few distinctive interval jumps that make them stand out from the wallpaper. And popularity matters: the more a song has been played at you, the likelier it is to lodge.
That last part is doing a lot of work. Elizabeth Margulis, who studies musical repetition, told the Harvard Gazette that repetition is central to why music sticks at all. Songs you've heard recently, or heard a hundred times, are pre-loaded. Which is why the earworm is so often something embarrassing. You don't get the obscure album cut stuck in your head. You get the song the grocery store chose for you.
There's an older, grosser, weirdly accurate metaphor for this. Marketing researcher James Kellaris described a catchy tune as a "cognitive itch": something about the melody irritates the brain just enough that it keeps scratching, and the scratch is the replay. The itch framing explains why fragments loop rather than resolve. Your brain has the hook but not the ending, so it keeps circling back, hoping this pass will finish the job.
Why it always happens in the shower
Here's the part that tells you something about your own head. Earworms don't strike when you're deep in a spreadsheet. They strike in the shower, on the walk to the train, while you're folding laundry, while you're lying in the dark. Researchers have found that involuntary musical imagery surfaces most in low-effort, mind-wandering states, when your attention isn't fully spoken for. Researchers at the University of Wollongong make the same point: when the mind idles, the jukebox switches on.
So the shower cliché is real, and it's not really about the shower. It's about what the shower is: one of the last places in your day with no podcast, no feed, no input. Your brain abhors that vacuum. Sometimes it fills the silence with worry, sometimes with imaginary arguments, and sometimes, mercifully, with the chorus of a song from 2014. Of the things your idle mind could hand you, an earworm is honestly one of the gentler options. Beaman and Williams, in a British Journal of Psychology paper, put earworms on a spectrum with other intrusive thoughts, the whole family of uninvited mental events. It's the same machinery behind the what-if-I-jumped jolt on a balcony: thoughts arriving without a sender.
Recent work goes a step further and links earworms to habit itself. A 2025 study in Consciousness and Cognition found that people who report more involuntary musical imagery also report more habitual behaviors generally, suggesting the stuck song is part of the brain's broader tendency to run familiar loops on autopilot.
The earworm is a habit you can hear.
Why fighting it makes it louder
You already know this from experience, but the research confirms it: trying to force an earworm out tends to backfire. Scientific American covered the suppression problem, and Beaman and Williams found the same pattern: the harder you push a tune away, the more real estate it claims. It's the classic ironic-process trap. Don't think about a white bear, and suddenly your whole skull is bears. Monitoring for the song is replaying the song.
What actually helps is less dramatic. You can crowd it out with something moderately absorbing, a task that borrows the mental channel the song is squatting in. Or you can go with my favorite finding in this entire literature: chew gum. A University of Reading study found that chewing gum reduced how often people involuntarily "heard" a recently played catchy song, apparently because chewing ties up the subvocal machinery your brain uses to sing to itself. Your inner voice needs your speech system to hum, and the gum is sitting in its chair.
And sometimes the answer is surrender. Play the actual song, all the way through, and let the fragment resolve. The itch gets scratched properly instead of endlessly.
What I find quietly useful about earworms, though, isn't the cure. It's the reminder. Researchers tracing the long history of the earworm note that writers were describing haunted, looping tunes long before psychology had a name for them, and a 2023 theory paper is still working out a unified account of why they happen at all. Which means one of the most universal human experiences, the song stuck in your head right now, is your mind doing something nobody fully chose or fully understands. Your inner life has weather. Not everything up there is authored by you.
That's worth sitting with, because most of us treat every thought that surfaces as a message we're supposed to decode, when some of it is just... playback. People find unstructured time with their own heads so uncomfortable that in one famous study they'd rather shock themselves than sit with their thoughts for fifteen minutes. But the idle moments where earworms live are also where your actual preoccupations surface, if you let them talk. It's part of why we built Joice, a voice journal where you think out loud instead of at a blank page: the stuff looping in your head, musical or otherwise, gets quieter once it's been said somewhere.
A small experiment for the next mid-shampoo ambush, before you reach for the gum: ask where the song came from. The grocery store? A friend's car? A lyric that's a little too on the nose for your week? Half the time an earworm is random. The other half, your brain picked the track for a reason, and it's more honest than your playlist.