In my experience among young people sometimes homelessness is also just living with some friends, moving between friends places or some random locations, with most of your stuff being stored somewhere, without having permanent place to stay for long periods of time (like a year), and that’s usually because of affordability and availability.
That works for a bit but eventually friends get sick of it, and if they don't a baby is born and it suddenly becomes real weird and very obvious you are intruding on the baby. There is a timer ticking in this scenario. By the time all your friends have kids the chance you can stay anywhere reaches ~zero.