To some, the value of doing what you want is greater than the value of the physical structure. That could be because they consider time extremely valuable, they don't value a home as highly, or because they hate the work. It's usually some combination of the three.
A lot of voluntarily homeless just see "society" as the entire list of rules of what you're supposed to do (go to college, get a job, buy a house, settle down, have kids) and reject the whole of it. It could be that you've seen enough to think that the entire system is flawed, so you just bail on all of it. It could be that those ideals just don't jive with you personally and are completely unappealing. That's how I felt when I dropped out of college and moved to China for no good reason. (Homelessness came after that). I was on track to be an investment banker or something, but hated the idea a little more each day until I finally said, "f this, I'm out" and started vagabonding around Asia.
Maybe there is an element of mental illness, I don't know. I had lunch with a psychologist once and he tried saying, "Seriously, listen to me, you are mentally ill." I guess he thought I was crazy - maybe I am - but I never went in to see him. I had no interest in altering my mind with drugs. I like who I am, even when it is difficult to interoperate with the rest of society.
When I was homeless, security was worthless. I still think it's largely an illusion, but that's a different topic. Freedom to do what I loved was well worth not having a home for. Working happened to be the thing that I loved, and I especially loved tech. I worked 16 hour days - I just wanted to work on my thing not someone else's thing. If I had enough runway to afford a House I would have done that, but I didn't. So living in a Honda civic it was. It didn't really bother me, to be honest. A bed is a bed.
Now I am married and have a baby on the way. I still don't care about security, but they need it, so ok I'm kind of reformed in that way. Luckily we're now funded so i still do exactly what I want all day. I don't know what would happen if the company failed. It's just not an option.