Many are homeless because of their choices or habits.
No, they are homeless because society has failed them.
In the same society, you can find fewer homeless people than people with residences. Can we use the same logic to infer that society promotes those people to have a home?

Not really, because we’re talking about what serves people best.

Most people have homes under virtually any political and economic system. So, when we do compare, we know capitalism fails us way more often.

You can find homeless people in communist states. So, is it really capitalism that drives people homeless?

Name one communist state, as in a state that has communism as an economic system

Socialism is generally associated with greater housing availability and lower levels of extreme poverty.