To learn the real reason why people pass out candy on Halloween, one would need to study the origins of the holiday all the way back to the middle ages. In the middle ages poor people would beg for food in exchange for prayers for the dead on All Saints Day. Some say the food was left out on the front step as offerings to the dead who wander the streets trying to return home. The belief was that the spirits would get angry and haunt their loved ones if this offering was not made. Similarly, today candy is given out to ward off tricks.