I’ve talked to people who work at homeless shelters. They say most the people who sleep outside do so because they do not wish to abide by the rules of the shelter (like being there at 10 PM and so on).
I had a sister who slept in a shelter during some bad times, she was robbed blind every night