“Not a productive endeavor” could be a classification for thousands of businesses that exist and make money. That just seems like a weak justification for attacking a marginalized group.
Safety issues are a concern but for example in my city, firefighters often have a “fill the boot” fundraiser where they run around cars at stoplights trying to get people to put money into a boot that they’re carrying around. This is no different than pan handling, except one group is viewed more favorably than the other and safety doesn’t seem to be such an issue with the favored group.