And talking of history, Halloween originated from the Celtic festival of Samhain where people lit bonfires to scare off ghosts on the eve before their New Year, which back then was on November 1st. The Celtic druids believed these malevolent spirits were responsible for failed crops and all manner of ill fortune summoned from the earth. Samhain eventually became Hallows Eve before the Halloween we recognize today.
The Irish and English tradition of trick or treating was eventually exported to Irish communities in the US where today it is more popular than its UK birth place and Halloween festivities there are second only to Christmas celebrations.