The tradition of dressing in costumes and trick-or-treating may go back to the practice of "mumming" and "guising," in which people would disguise themselves and go door-to-door, asking for food, Santino said. Early costumes were usually disguises, often woven out of straw, he said, and sometimes people wore costumes to perform in plays or skits.
The practice may also be related to the medieval custom of "souling" in Britain and Ireland, when poor people would knock on doors on Hallowmas (Nov. 1), asking for food in exchange for prayers for the dead.
Trick-or-treating didn't start in the United States until World War II, but American kids were known to go out on Thanksgiving and ask for food — a practice known as Thanksgiving begging, Santino said.
"Mass solicitation rituals are pretty common, and are usually associated with winter holidays," Santino said. While one tradition didn't necessarily cause the others, they were "similar and parallel," he said.