The idea behind “trick or treat” is the implied threat of playing tricks on a homeowner if the treats aren’t given. That’s extortion, but it's a big part of how we celebrate Halloween. We often don't explain it that way to our kids.
But Nana the border collie (previously at Neatorama) has a better technique, the “trick for treat”! She goes to a neighbor in her ladybug costume and performs her best tricks to earn treats. -via Tastefully Offensive