In America (and elsewhere?) we have a tradition of trick-or-treating where on Halloween or the night before kids go around the neighborhood in a costume, knock on doors, and get candy. It’s a lot of fun.
But I was well into adulthood before I learned that not all places have kids tell jokes before they get candy. Apparently it’s only the city I grew up in that they do that! Not even neighboring cities do it.
Beggar’s night is not the same thing as Halloween. Some areas designate a specific date and time for the kids to do trick-or-treat, not on Halloween. This is beggar’s night.
In that case I’m guessing a certain religious group decided that in addition to the devil, tricks are dangerous, and a nice joke is safer.