@whitequark afaik we actually don't know the full history of how the celebration evolved, because it was 400 years ago.
people lighting bonfires as a form of celebration, especially in relation to events involving kings, goes back as far as written record. people were still doing it as recently as WW2.
anyhoo, when the Guy Fawkes plot was foiled folks lit bonfires in celebration that the king didn't get killed, which became an annual thing.