The path to fame is a fickle one. Even established stars have released sadly underperforming works every once in a while. That is why the creative process requires careful decisions aside from the age-old trial and error and listening to what might work.

These songs then need the approval of the recording label, or whoever has the final say before a song's release. Some songs, however, are born out of a stroke of luck - be it a happy accident or a last-minute decision. Here are four songs that came out of nowhere, were almost scrapped, released anyway, and somehow climbed to the top of the charts.

"Kiss" by Prince

Prince didn't only release hits for himself, but also for other artists, often under the guise of a pseudonym. The Purple One was the "Christopher" who wrote "Manic Monday" for The Bangles and the "Joey Coco" behind Kenny Rogers' "You're My Love." 

Prince on the
(Photo : Prince YouTube Channel)

One of the songs Prince was supposed to write for another act was "Kiss," the first incarnation of which was an acoustic demo of a folk-country sound. He gave the record to funk band Mazarati, who worked with sound engineer David Z. The next day, David Z found Prince, who told him, "This song is too good for you guys. I'm taking it back," while adding his signature guitar and falsetto to the song.

The finished track was presented to Warner Bros, his record label, who thought that it sounded like a demo. David Z later recalled that "the Warner Brothers executive freaked out when they first heard it." Prince did not take no for an answer and said that the label wouldn't get another song unless they release it. The label relented, but the song topped the Hot 100 for two weeks, earned a gold certification within a year of its release, and was recognized by Billboard as Princ's second most successful hit.

"Smells Like Teen Spirit" by Nirvana

The title to this iconic Nirvana track came when frontman Kurt Cobain went home to see the words "Kurt Smells Like Teen Spirit" spray-painted on the wall. He thought that it was some revolutionary slogan when it actually referred to a deodorant - a fact Cobain would learn months later.

Kurt Cobain on
(Photo : Nirvana YouTube Channel)

With the title inadvertently inspired by a deodorant, the song itself was actually an attempt at copying the style of the Pixies, the 80s alt-rock band from Boston. When he presented the song, which only had the main guitar riff and chorus vocal melody, bassist Krist Novoselic promptly called it "ridiculous." After an hour and a half of playing the intro, Novoselic started slowing down, giving drummer Dave Grohl the idea for the beat. As a successful collaborative work, all three members a credited as writers for the track.

The song was not an instant hit upon its release. Still, it started building up thanks to modern rock and campus radio stations that apparently felt the same revolutionary message Cobain released. It topped the US alternative songs chart and peaked no. 6 on the Hot 100 as their album "Nevermind" topped the Billboard album charts.

READ ALSO: 4 Classic Albums That Flopped When They First Came Out 

"Sweet Dreams (Are Made of This)" by the Eurythmics

Perhaps the latest work that featured this song was the Quicksilver sequence of the 2016 film "X-Men: Apocalypse," and who knows what song would be used if the British pop duo Eurythmics never released their hit song?

In 1982, the duo of Annie Lennox and Dave Stewart were only in their second year as the Eurythmics and were already in dire straits. While their first album did well commercially, it was rife with personal and professional tensions between the artists and their record label. As Lennox and Stewart were forced to record in an attic above a picture framing shop.

The day they wrote the hit song was the same day they almost broke up for good, Lennox revealed in her biography. Steward told him, "Okay, fine, you don't mind if I go ahead and program the drum computer then, do you?" referring to the synthesizer they had just bought. It sounded so good that Lennox added a synth line on the spot and sang the song that reached No. 2 in the UK singles chart and topped Hot 100.

"No Diggity" by Blackstreet

The musical backing for the track "No Diggity" was originally done by Dr. Dre and was supposed to be used for 2Pac's debut "All Eyez on Me," under Suge Knight's label Death Row Records. As Dre left the label, he sold the beat to Teddy Riley, who produced the song. He first offered to his group Guy, who didn't want any part of it.

Riley then offered the song to his other group, Blackstreet, who also voiced a dislike for the song. The singer-producer recalled in a 2010 interview that "None of the guys liked 'No Diggity.' None of them."

"You know how they say they pushed the little one out there to see if it tastes good and see if he would get egged? Well, they pushed me out there-and it became a hit. And now they wish they were singing the first verse, so that they can have the notoriety like me," Riley said.

For a song nobody liked, it topped the Hot 100, the Hot R&B/Hip-Hop Songs chart, Hot Dance singles chart, and the US Rhythmic charts in the US and a Grammy award.