Leaving them on the streets is also more expensive than housing them.
When they’re on the streets, it means the government must pay for emergency services, extra sanitation work, police are called more frequently, etc.
A chronically homeless person costs the tax payer an average of $35,578 per year. Costs on average are reduced by 49.5% when they are placed in supportive housing. Supportive housing costs on average $12,800, making the net savings roughly $4,800 per year.
http://endhomelessness.org/wp-content/uploads/2017/06/Cost-Savings-from-PSH.pdf
Studies have shown that – in practice, and not just in theory – providing people experiencing chronic homelessness with permanent supportive housing saves taxpayers money.
https://www.npscoalition.org/post/fact-sheet-cost-of-homelessness
Without connections to the right types of care, they cycle in and out of hospital emergency departments and inpatient beds, detox programs, jails, prisons, and psychiatric institutions—all at high public expense. Some studies have found that leaving a person to remain chronically homeless costs taxpayers as much as $30,000 to $50,000 per year.
https://www.usich.gov/resources/uploads/asset_library/Ending_Chronic_Homelessness_in_2017.pdf
This obviously varies from state to state. But generally it is cheaper to fix the root of a problem (housing) than a symptom (emergency services), and that applies to homelessness.
But even if it wasn’t a better option from a purely cost/benefit analysis, the moral thing to do is to house the homeless. So no matter what, it is something we should be doing.