Criminalizing poverty is usually a fairly local thing in America, but it's also not all that uncommon, either. Of all the countries I've spent any time in, the US seems to have the widest variety of laws (no unexpectedly).
And scriver, it's not so much to promote criminal behaviour as it is to make the city unattractive as a homeless destination, and to convince the homeless people that ARE there to go elsewhere, like maybe out into the countryside where they will die and stop being an eyesore. :/ (This is the thrust of actual arguments I've heard from those supporting these sort of laws, though thankfully not from the policy-makers, who I'm pretty sure just want the homeless problem to go away and don't specifically want the homeless and poor to die)
Personally, though, I'm not a fan of the laws that make it illegal to live in a place unless that place is "legal to live in", while providing no alternatives. I mean, I guess I can understand the arguments, but by requiring every single place to spend the night to meet strict requirements that put them out of the price range of even the working homeless, that's a serious problem. When I spent some time being homeless, I paid a good deal of money (for me, at the time, far less than it would have cost to get an apartment and it left enough left over for me to eat) to rent a 24-hour parking space, thinking it would be great to have a place to actually park my car when I needed to sleep that was fairly secure and where I wouldn't have to live in constant terror of breaking the law simply by existing.
And then, of course, the police showed up, and forced me to leave, saying it was a "safety threat for me to sleep there, and I had to go somewhere else". Note there were no shelters within a dozen miles, none of those within twice that had any sort of parking, I couldn't exactly afford a ton of gas, and without my vehicle I had no way to get too and from the job I was working that was keeping me fed.
I seriously wanted to fucking spit in that police officers eye that night. It wasn't that the parking lot owners had a problem with me sleeping there (they might have, I have no clue), but that the police thought it was too much of a risk to ME, somehow, to have a place to spend the night.
And the thing is, I had it good compared to most homeless folk.
Unfortunately, this isn't all that much different in most other countries I've had experience with.