The decline of trick-or-treating

In this image: A pile of Halloween candy.

Trick-or-treating is a vital part of Halloween nostalgia and yet, every year there has been less and less. What happened to trick-or-treating?