This seems to have derived from the pagan celebration of Imbolc  the Feast of the goddess Bridget, or in Christian Ireland St. Bridget’s Day and alternatively “The Purification of the Virgin” commemorating the time when St. Mary presented Jesus at the Temple at Jerusalem.