Fifty years ago, a spontaneous studio collaboration produced one of the most recognizable rock songs of the 1970s—thanks to a surprising co-writer.