 Molnár 's ending was unsuitable , and after a couple of false starts , Hammerstein conceived the graduation scene that ends the musical . According to Frederick Nolan in his book on the team 's works : " From that scene the song " You 'll Never Walk Alone " sprang almost naturally . " In spite of Hammerstein 's simple lyrics for " You 'll Never Walk Alone " , Rodgers had great difficulty in setting it to music . Rodgers explained his rationale for the changed ending , 
