Jonathan pointed out a couple of days ago that the well-known and beloved Chanukah story — the miracle by which one day’s worth of holy oil burned for eight days to light the rededication (Channukah) of the Temple after it was purged of Greek ritual images (“idols”) — has no basis in the contemporaneous and near-contemporaneous accounts of the Maccabeean revolt that constitute the first two Books of the Maccabeees.
They do, however, make a beautiful fit with the equally well-known and beloved ceremony of the (thoroughly minor) festival: burning one candle the first night, two the second night, on on up to eight.
So here’s a theory, without any independent factual basis, to combine the two observations. Maybe the Chanukah story is an instance of Robert Graves’s theory that ritual precedes, and generates, myth. The ceremony of the candles is obviously fitting for a solstice festival, where the natural theme is light increasing. So perhaps the ceremony came first, and the miracle tale was a retrofit, a “just-so” story to explain the ritual.
As I say, this is pure conjecture. As far as I know, there’s not much evidence about how or when either the ritual or the story developed.