Simple fact is there were less homeless when America was great because we warehoused our mentally ill and addicted people in "state hospitals" and prisons. from the 70's-90's this ended as the government-funded hospitals were closed
because taxes.
Also the laws surrounding involuntary commitment changed as well — that was a good thing.
For-profit boarding homes (and prisons) sprang up to contain these people. Like any for profit "institution" these places were no better than the state could do and in many cases much worse as their motive was profit not improvement. Today these places can cost tens of thousands per month (because capitalism) so obviously poor people are forced out if they could ever find a bed in the first place. But "deinstitutionalization" made a few people lots of money and made a few other people feel good about kicking out the moochers.
Like all other medicine, capitalism has taken over. We spend more on medicine yet receive worse care than other rich countries. We are 50th behind other rich and not so rich countries in infant mortality. We spend huge percentage of GDP on medicine but because medicine is for-profit, government money just causes the bill to rise that much more.
The other part of homelessness is lack of homes for those willing and able to work but low-skilled, low-paid. Zoning and NIMBYism prevents construction of low-income, high density housing making any home unaffordable in cities... where the jobs are.
To rent the average 1bdrm apt in San Fran you need to earn about $125k/yr. Not exactly dishwasher wages. In fact as more and more money is hovered up by the top rung of society, there is simply less to go around—why else would the stock market again be so overvalued, not to mention all the off-book transactions.
The US populace and government spends more than most countries on for profit medicine and for profit militarism—ye olde Military-Industrial complex is only rivaled by the Medical-Industrial complex. But surprisingly, or not if you follow politics, we are dead last among OECD countries in what is termed "social protection." Think, police, fire and courts. But also measures to help people with a litany of ill fates that befall citizens. Our programs range from OSHA to disability to unemployment to mental heath services: WIC, TANIF, SNAP, and of course especially SSI.
If one shakes their head and scoffs at those programs and votes for the political party that makes those services the butt of jokes and fund-raising emails, there is only one direction to point.
The legitimate object of government, is to do for a community of people, whatever they need to have done, but can not do, at all, or can not, so well do, for themselves -- in their separate, and individual capacities.
-- Abraham Lincoln, Fragment on Government (July 1, 1854)