People traditionally dressed up as ghosts, ghouls etc on Halloween to avoid being recognized by ghosts, and spirits.

(The idea is that any ghosts would will mistake you for a fellow spirit and therefore leave you alone. Of course you don’t want to look too good, or they may decide to form an attachment.)