Janis Joplin’s “Mercedes Benz” was an accident. The song’s lyrics were written at a Port Chester, N.Y., bar in August 1970 during an impromptu poetry jam between Joplin and songwriter-friend Bob Neuwirth. The lyrics—a sardonic prayer for a sports car, a color TV and a night on the town—were inspired by the first line of a song written by San Francisco beat poet Michael McClure.

About an hour after the song was completed in Port Chester, Joplin performed it a cappella on a whim when she took the stage at the town’s Capitol...