Sometimes people do go from homed to homeless in one step.
Sometimes it happens in steps.
The fact that this occupies a continuum rather than a binary status makes it more difficult to classify homeless vs homed as well as provide and (more importantly) justify services to them. There's a whole contingent of people who think that sleeping in a room under a roof == homed. Sleeping indoors in a situation where a person lacks stability and can be un-homed again at someone else's desire is not homed....not necessarily homeless, either.
There are multiple issues.
I tend to think that public studios, like a small version of UK Council Housing, would help at least get people roofs over their heads for a sliding-scale cost, looking at it as a public good (e.g., homelessness is bad for many reasons, at least one of which involves epidemiological and other public health concerns). Once people have at least some stability, they can start building something - but lots of mentally ill homeless are too fragile to do that.