Why do we say 'trick or treat' on Halloween?

Before the act of trick-or-treating, there was a whole lot of tricking.

Examined