There’s no single answer, but:

1.) A lot of the visibly homeless population suffers from either mental illness, drug addiction or both. The statistics I’ve seen for cities on the west coast put it at approximately 40% for mental illness and a similar percentage for addiction. These are self reported numbers, so they are probably under reported.

2.) Related to #1, good mental healthcare is very hard to come by in the United States, especially if you are poor. In the 80s the federal government cut funding drastically, leaving it up to individual states to cover the gap. Most didn’t and have continued to cut budgets even further in the ensuing years.

3.) Related to #2, the Deinstitutionalization movement successfully fought for the rights of the mentally ill, but there were unintended consequences. Right now it is extraordinarily difficult to convince a judge to commit someone to long term, in-patient psychiatric care unless they present an immediate threat to themselves or others. In practice, this turns out to be very difficult to prove. In most cases, if the person can’t be proven to about to commit murder or suicide in the next few hours, they won’t be committed against their will.

4.) Most states have closed all but a one or two state psychiatric hospitals, which is where people with severe mental illness used to be housed. The theory was that states would build community integrated outpatient care facilities, but many of them didn’t. As a result, many long term psychiatric patients were turned loose with nowhere to go, and became homeless. Also, now that those facilities are closed, when a judge does decide to commit someone, there’s often nowhere for them to go. In the state I live in, the only remaining state psychiatric hospital hasn’t had an available bed in years.

5.) Related to #3 and 4, jails have become our defacto mental health treatment facilities because there’s nowhere else available. As a result, a lot of people who should have been take into care end up with a rap sheet, which shows up on background checks, and makes it difficult to obtain housing or jobs. The same is true for people who are not mentally ill, but have drug addictions.

6.) There’s a lot more supporting infrastructure necessary to allow you to go to work than you’d think. At bare minimum, you need an alarm clock to wake you up in time, you need some basic hygiene and grooming capabilities, and you need to feel reasonably confident that when you walk away from your home to go to work, your things won’t be stolen. A person living in a tent has none of those things. A person living in a shelter might have some of them, but if they leave their stuff unattended it’s almost certain to get stolen. They may be able to take a shower or wash their clothes, but probably not on the same day, and not more than once a week. Regardless of when their shift starts, most shelters have strict curfews, which means that a person staying there can’t work non-traditional hours. Space in the shelters is often first come first served, so if you miss the bus and don’t make it back to the shelter on time, they’re likely to be full and you’re back on the street. It’s very difficult to establish stability using the shelter system.

Finally, you asked why people who don’t have jobs don’t live with their families. A lot of the time it’s because they have untreated or poorly treated mental illness that makes living with them incredibly difficult. Nobody likes to talk about it, but families who have severely mentally ill members in the United States are often forced to make the heartbreaking choice between their own sanity and the wellbeing of their family member. The same is true for people suffering from drug addiction. Sometimes you have to choose your own sanity, or you’ll be on the streets too.

Hopefully that helps you understand what you’re seeing better.