This Stephen Sondheim song had originally been intended for the musical "Company" but was dropped from the show because Sondheim felt that he could not make it work. A friend of his, named Judy, was a champion of the song and so pestered him about it that Sondheim actually paid for an entire session with Harry recording the song as a Christmas present for Judy. (Source: Curtis Armstrong)
"Judy" was Judy Prince, the wife of theater producer, Hal Prince. According to Sondheim, "I was playing it and I told Hal that I had started this song but thought I should not finish it." The song didn't work in the context of the play. Hal Prince agreed, but Judy, who had been listening outside the door later told Sondheim, "I don't care whether it fits or not; I just think it's fabulous." So, as a Christmas present for Judy Prince, Sondheim had Harry Nilsson record the song for her.