My favorite song-creation story: the song "Maniac", which was made famous by the 80's film Flashdance, was originally written by its author Michael Sembello as a joking ode to a serial killer. The tape on which it had been recorded was sent to the studio by accident, and they liked it so much they him rewrite the lyrics into something more romantic.
"He gives the kids free samples
Because he knows full well
That today's young innocent faces
are tomorrow's clientele..."