It's now regarded as one of the most beloved festive songs of all, but it nearly ended up discarded in the garbage bin.