It's a service. The state/city that provides the best service for homeless people - that's where I will try to go if I don't have a home.
Politicians don't seem to understand this. Or maybe they do, but they do the wrong thing in order to drum up politically correct votes.
Take San Francisco. It spends $400m on homeless each year. With $400m, you can probably just buy a small apartment in Idaho for every single one of them. Problem solved. Are you homeless? Make your way to San Francisco. The tax payers in the city will buy you a home in Idaho - no questions asked.