There is a lot of evidence that housing the homeless is not only more humane, it's also smart economics. By the time you sum up all the costs of homelessness, it's a pretty nasty toll.
The biggest actual expense is the massive medical bills from exposure and neglect. Police and ambulance services are likely a close second, chasing around town and dealing with random mentally ill people in dire straits.
The other costs are less obvious. As homeless clutter your public spaces, your city starts to rot. Parks become open areas of blight as the homeless overwhelm them and destroy the services they offer. This means much of the money your city invests in parks and public spaces ends up going to waste. Unless you spend more money on police.
The final big expense is clean up and sanitation... unless your city doesn't clean up after homeless people in which case you just end up with actual shit in alleys on big piles of garbage on street corners.
Putting up housing isn't a perfect solution, but it certainly eliminates some significant parts of that.