Some of the most famous songs in music history weren’t the result of careful planning or months in a writing room. They showed up while someone was learning a new instrument, dreaming, joking around, or just making noise in a rehearsal space. The stories behind these tracks are a good reminder that inspiration rarely follows a schedule, and sometimes the biggest commercial success comes from the moment an artist wasn’t even trying. What follows are seven cases where a chart-topping, career-defining song began as something almost incidental, a throwaway idea, a technical mishap, or a private joke that somehow became public property.
Guns N’ Roses and the riff nobody planned to keep

The origin story of “Sweet Child O’ Mine” has been repeated so often as a warm-up exercise gone viral that even Slash has had to correct the record. He explained that it wasn’t a warm-up exercise, and that he was sitting around the house where Guns used to live around 1986 when he just came up with this riff. It was just him messing around and putting notes together the way any guitarist builds a riff, finding a melody note by note.
What makes the story genuinely accidental isn’t the myth about practicing scales, it’s that nobody in the room thought they were writing a hit. Slash has said that at the time it was just a song, and nobody had any designs for it to be a big hit, just something they put together that felt cool before recording Appetite for Destruction. Izzy Stradlin added chords behind the riff, Axl Rose built a melody on top, and a song nobody was chasing turned into Guns N’ Roses’ only number one single in the United States.
Radiohead’s joke that producers took literally

“Creep” almost never got recorded because the people running the session misunderstood a joke. During a rehearsal, the band burst into a song they had apparently just written, and when they finished, Thom Yorke mumbled something like calling it their Scott Walker song. Producer Paul Kolderie thought he heard it was a Scott Walker song outright, and he and his partner assumed it was a cover, telling each other it was too bad the band’s best song wasn’t original.
Once the misunderstanding was cleared up, the producers pushed to record it immediately. When they discovered “Creep” was an original composition, they insisted Radiohead record it, and after one take Kolderie knew they had something special. The song flopped in the UK at first, only breaking through internationally after American and Israeli radio picked it up, turning a private in-joke into one of the defining rock singles of the 1990s.
Phil Collins and the drum sound born from a wrong button

The thunderous drum fill in “In the Air Tonight” exists because of a mistake with a microphone, not a deliberate production choice. While working on Peter Gabriel’s third solo album, engineer Hugh Padgham discovered the sound accidentally after he opened an overhead microphone intended as a talkback channel above Collins’s drum set. That mic happened to be running through heavy compression and a noise gate, and the combination produced a massive, cracking sound that cut off unnaturally fast instead of ringing out.
Collins loved the accidental effect enough to build an entire song around it. He later recalled playing around in the live room while the engineer was mucking around with noise gates and compressors, and that a drum sound developed that he started playing along to, matching the tempo set by the gate cutting off. That gated reverb technique, discovered by accident in a London studio, went on to define the sound of drums throughout the 1980s.
R.E.M. and a mandolin nobody expected to matter

“Losing My Religion” grew out of Peter Buck simply trying to learn a new instrument. Buck wrote the main riff and chorus on a mandolin while watching television one day, having just bought the instrument and attempting to learn how to play it while recording himself as he practiced. He wasn’t composing on purpose, he was just running the tape while he figured out where his fingers went.
The song only came together because Buck happened to review the tape later. Buck said that when he listened back to it the next day, there was a bunch of stuff that was really just him learning how to play mandolin, and then there was what became “Losing My Religion,” surrounded by more practice noise. The band reportedly finished arranging the music in about five minutes once they heard it, and the label’s decision to release a mandolin-driven track with no traditional chorus as the lead single from Out of Time became R.E.M.’s biggest American hit.
The Beatles and a melody that arrived while asleep

“Yesterday” is perhaps the most famous accidental composition in pop history, and Paul McCartney has told the story consistently for decades. According to biographers of McCartney and the Beatles, the entire melody came to him in a dream one night in his room at the Wimpole Street home of his girlfriend Jane Asher. He woke up, rushed to the piano beside his bed, and worked out the chords before the tune could slip away.
McCartney was so unsettled by how easily the melody arrived that he assumed he must have unconsciously copied it from somewhere. Initially convinced it must be an already existing song, he spent about a month going round to people in the music business asking if they had heard it before, describing it as feeling like handing something in to the police, figuring if no one claimed it after a few weeks he could have it. Only once nobody recognized it did he trust the melody enough to write real lyrics for what became one of the most covered songs ever recorded.
The Kingsmen and a vocal take nobody could clean up

“Louie Louie” became a hit almost in spite of itself. The Kingsmen recorded the song quickly and cheaply in 1963, and singer Jack Ely, leaning back from a single overhead microphone to be heard over the band, delivered vocals that came out slurred and largely unintelligible on the finished take.
That vocal murkiness turned into free publicity. Rumors spread among teenagers that the mumbled lyrics were hiding obscene content, which eventually drew the attention of federal investigators. The resulting inquiry, which ultimately found nothing objectionable in the largely indecipherable vocal track, only fueled curiosity and helped push a regional garage-rock single into a national hit and a lasting rock and roll standard.
The Champs and a word shouted almost as an afterthought

“Tequila” started life as a B-side, the kind of throwaway instrumental studios recorded to fill out a single without expecting much attention. The track was built around a simple saxophone riff, and the word that gave the song its title and its hook was reportedly added almost as an ad-libbed shout during the session rather than as a planned lyrical centerpiece.
That single shouted word became the most memorable part of the record. Despite being conceived as filler music, “Tequila” ended up on the A-side of public attention, topping the charts in 1958 and later winning a Grammy, all because of one word nobody had bothered to write down in advance. These seven songs share a common thread: none of them were built through careful, deliberate hitmaking. A guitarist messing around at home, an engineer hitting the wrong microphone switch, a singer dreaming a tune he thought he’d stolen, all of it points to something musicians have long suspected but rarely like to admit. Sometimes the best material shows up when nobody is trying too hard to find it.
