Just as an example, one young man I spent a lot of time with had a family that wanted him to come home, but who wouldn't let him smoke weed in the house. I wouldn't have called him an addict by any stretch, but it was something he was unwilling to give up. He was a strong, able bodied guy that could have gotten a job. Despite all of this, he decided he'd rather live on the streets and do what he wants. (Could he have had severe mental problems and be making all of this up? Sure, but I don't believe that he did).
It's actually the biggest reason I stopped volunteering. Over the years that I volunteered, I noticed a steady shift from people who really need and/or want help to a large number of people like the young man I described. When helping out the homeless people you can't pick or choose or make judgements, so you treat everyone equally. But it became very hard to hand out things like sleeping bags to folks like that young man and then see people who really did have nothing unable to get one.
But, yes, in your example if you offer anyone a free million dollar house they will take it over living on the streets, but I don't think that's a very realistic comparison.
Also, to be clear, I'm just some dude. I don't have any realistic answers to fix the problem.
The one sees in cities are not those at all. Where they have access to shelters or even housing and they prefer to live as homeless instead is overwhelmingly because the housing and shelters are substandard, moldy, they’re exposed to risks of abuse including sexual abuse, they may not be allowed to bring their pets in, they may have addictions that they will be asked to wean off cold turkey (both understandable from the housing/shelter point of view, but it’s also obvious why someone addicted to a substance would not be able to do this), etc.
In my interactions I was genuinely surprised by the really large percentage of homeless who preferred to live on the streets (even in the winter) over decent shelters without many of these risks, because of pets not being allowed. For many the companionship with the pets are quite literally keeping them sane, and there’s no way they’d give them up, and yet the vast majority of shelters have a no pet policy (again, understandable, but it still is a contributing problem).
Now, there are definitely a few homeless who have mental health issues. And unfortunately, for obvious reasons those are the ones most people are likely to encounter (the sane homeless people prefer to stay out of the way and would prefer avoiding people altogether because of the shame and the judgment they’d encounter to begin with). So most people’s (including mine until I started volunteering with organizations that worked directly with homeless people) estimation of homeless people is based on this tiny minority at one extreme. Which is unfortunate because it makes passing actual useful policy that will help the homeless and reduce homelessness and all the issues that come with it, very difficult to bring into force.
The few shelters I've looked into have a huge list of rules that are strictly enforced which quickly turned me away. And they were in old, run down, dirty buildings. It almost seemed like they didn't want anybody to use the shelters, and very few appeared to be using them.