"Trick or treat" evolved from a notion that when hungry ghosts are trying to eat you, a person only survives with protection from the saints.