According to the Gregorian calendar, the Catholic All Saints Day (the day that reminds saints and martyrs) befalls on November 01 and the All Souls Day (the day that honours the faithful departed) falls on November 02. The aforementioned holidays represent death and the afterlife.
The night before the All Saints Day was named All Hallow’s Eve (here, hallow represents holy) which later changed to Halloween. During autumn, leaves die and fall from the trees and also, Samhain in the Celtic new year represents the harvest season. So, keeping in mind the autumn season, the All Saints Day was declared on Nov 1. The Celts offered food during Samhain as a way to thwart evil spirits. On the Halloween day, the poor would go Souling i.e., they visit houses and offer prayers for the family’s dead in exchange for the food.
When Irish and Scottish immigrants brought Halloween traditions to the United States during the 19th century, the holiday began to be associated with naughtiness, and trick-or-treating became an Extortion Deal (as what it is called). The Halloween has one main motto, ‘Give us treats or we will play a prank on you.’ In the late 1930s, when the vandalism become more serious, communities began to encourage trick-or-treating to keep youngsters out of trouble.