For one of those -- homelessness -- the costs to society for
not housing everyone exceed what it'd take to simply give everyone some fixed shelter. We still give medical care to homeless people, we jail them (at costs far greater than housing would be), we offer a variety of social programs that aren't housing, and it all adds up to much more than they had a stable place to live. We'd be jailing fewer of them, and their health care needs would be less if they weren't exposed to the elements through rough sleeping night after night.
Why don't we? Because of so many people who point out the unfairness of someone who's not working at all getting housing for free from the government, when so many working people are struggling to house themselves.
So there's perhaps other unfairness at work there that people are unwilling to look at how solve (why is housing so expensive, relative to wages? why do we expect people to work 2-3 jobs and have no leisure time, no time to relax, just to satisfy the basic needs of survival?), and that alone seems to have boxed people into a system where we're jailing people and leaving them out in the elements, even though it costs us all more in the long run.
Where health care is concerned, what bothers me most is how outrageously expensive US care is for its outcomes, compared to every other western nation. That doesn't seem right, and doesn't seem like a good use of our society's money or human effort, expending so much money on systems that could easily be made unnecessary -- like medical billing and the mass of health care insurers.
(And then I had an ex whose father is a doctor, a GP, who lived a very nice life, and insisted that he deserved that...when I asked him what he thought about how doctors in other countries aren't so richly compensated, he only responded, "hey I went to med school, I deserve this," and he too couldn't conceive of a different ordering of things, because...I'm guessing here...his mind went to the couple of new cars in the driveway of his massive house in a tony suburb of an expensive east coast city, and how, had he had less, he might have just one new car instead of two...but that's a speculation on my part. I wasn't inside his head.)