The purpose of it is something like casting out the bad winter spirits or so. For many communities and local gardeners it's also an easy way to get rid of all the tree-cut and "green waste" that accumulate over the colder seasons (when it's safe to cut trees).