The United States has a serious problem: its people are too kind to the homeless.

Granted, this is not the impression one gets from reading the popular press. To hear them tell it, the rich are forever grinding the faces of the destitute beneath their boot, and only brawnier, more vigorous government can do anything to alleviate the suffering.

As it turns out, brawny and vigorous government sometimes has very different ideas. Just ask Greg Schiller, who got into trouble with the authorities in Elgin, IL last December because he let a dozen or so homeless people stay in his basement on bitterly cold nights. Schiller would provide them snacks and play a movie—something G‑rated on account of his Christian faith. But an anonymous tipster reported him to authorities for operating a de facto boarding house and Schiller had to stop hosting movie nights for the people he described as his friends. Elgin officialdom took the view that “Schiller’s property did not comply with codes and regulations,” the New York Times explained.

Perhaps that’s just one crazy anecdote. We shouldn’t let Schiller’s experience with Elgin leave the impression that government hassles people for helping the homeless.

But what about Juan Carlos Montesdeoca? The cosmetology student ran afoul of authorities in Tucson, AZ when he started giving the homeless free haircuts. He did it “out of the kindness of my heart. Out of the memory of my mom, because she lost her hair,” he told a local TV station. But again, somebody complained. So the Arizona State Board of Cosmetology began investigating him for breaking Arizona state law, which stipulates, “A person shall not perform or attempt to perform cosmetology without a license or practice in any place other than in a licensed salon.” Montesdeoca was not (yet) a licensed professional, and he was giving haircuts at the library. The horror.

Fortunately, the story outraged Arizona Gov. Doug Ducey, who called on the cosmetology board to cease its investigation. He subsequently issued an executive order directing the state’s boards and commissions to review their licensing requirements.

There wasn’t such a happy ending in El Cajon, CA. In January, authorities there arrested more than a dozen people for feeding the homeless. The same thing happened a couple of years before in San Antonio, where chef Joan Cheever received a ticket with a fine of up to $2,000 for feeding the homeless in a public park. The year before that, nonagenarian World War II vet Arnold Abbott was arrested for feeding the homeless in Fort Lauderdale, FL. At that time, more than 70 municipalities around the country explicitly outlawed feeding the homeless.

Perhaps the officials in those localities figure it’s better for the homeless to risk starvation than food poisoning. Or maybe they think the homeless can find sustenance elsewhere. After all, they can always beg for money.

Or not. The National Law Center on Homelessness and Poverty (NLCHP) has reported that from 2011 to 2014 the number of cities that prohibit panhandling rose 25%. Three-fifths of cities have some form of panhandling ban (although recent court decisions are causing some to rethink them).

Some municipalities also bar the homeless from having a place to sit or lie down. The NLCHP reports that many localities outlaw loitering (65% prohibit loitering in certain public places; one-third prohibit loitering outright), sitting or lying down in public (53%), sleeping in a vehicle (43%), and camping in public (34%). Basically, in much of the country being both homeless and stationary is prohibited. Jogging, apparently, is fine—so long as you don’t stop to rest or ask for money.

The impetus behind all these prohibitions is understandable. Municipal leaders want their localities to present a pleasing aspect to the world, and the presence of unkempt, smelly homeless people in public areas is not conducive to that wish. (If only the homeless could somehow get free haircuts!) That’s why Honolulu passed a raft of anti-homeless legislation in 2014. “We absolutely had to,” explained the head of the city’s tourism authority. “The No. 1 reason that people were saying they would not come back to Hawaii was because of homelessness.”

Just so. Having homeless people walking the streets and sleeping in the parks is not a good look for local governments. But then what are the homeless to do? Perhaps localities could find a way for the homeless to stay with private citizens — at least on bitterly cold nights, when it’s … oops.

Never mind.