Economists haven't adopted the vainglorious practice of physicists and applied numbers to their laws, but if they did, the first law of economics would be that lump-sum transfers are more economically efficient than in-kind transfers. If you are going to give a gift to somebody, you should just give them the money. They will be a better judge of the best way to spend it.
If instead, you give them a specific good, then you make them worse off, unless you somehow miraculously anticipate what the recipient would purchase if he received the money instead.
Now if you know someone well, perhaps you can anticipate the type of gift they might like. But Halloween is no time for thoughtful, targeted gift-giving. At Halloween, each house on a typical American block picks out one type of candy, and they give that exact same candy willy-nilly to everyone who shows up at the door. It's an economic nightmare.
Fear not, a solution:
So let's do something to reform Halloween. The first step would be for Halloween donors to give kids money instead of candy. Kids could then go to the supermarket the next day and binge on the candies they really like. That solution would get an A-plus in economics.
Such coordination is, unfortunately, unlikely. It would also distort the holiday's demographics: An in-kind transfer of candy ensures that (for the most part) only children trick-or-treat and the marginal value of candy guarantees that, eventually, the kids all stop and go home.
In conclusion, the article provides a more pragmatic step toward reducing the inefficiency:
I am not optimistic that Americans would be so enlightened. So other solutions should be sought. Many schools prohibit children from taking Halloween candy onto the premises. That is exactly the wrong policy. Schools should encourage all children to bring their entire haul to school, and allow them a lengthy period to trade candies among themselves. That way, the Take 5s and the 100 Grand bars will find their way to individuals who cherish them.
The efficiency of each transaction is likely much lower for Halloween than for Christmas, but the aggregate size of Christmas gifting assuredly makes that holiday's deadweight loss exponentially worse.