Well, as with many things in life, it depends on the location. The odds of there being a non-familial occupancy limit are a lot lower in Loving County, Texas than they likely are in Harris County, Texas, simply because more population tends to beget more situations where society has decided we need more rules.
While overall percentages are likely low, the percentages in the areas where homelessness is most acute are almost certainly higher. For example, San Francisco's occupancy ordinance says that, in general, the upper limit is two people of occupancy per bedroom. While San Francisco has repealed its rules about non-familial cohabitation, Dallas still has some limits (though they are sparsely enforced).
Further, areas where homelessness is most acute also tend to have a higher percentage of people who rent, since the barriers to building any kind of housing make all but the most expensive kind of housing--rental units with long-term ROI built for "luxury"--the only kind that get built. According to media reports in 2021, people who rent make up 65% of San Francisco's households. Same for Seattle, where 50.3% of households rent their dwellings. It is likely the case that not all of these rental agreements have restrictions on who can move in and at what time, I would bet one months' rent that the overwhelming majority do.
> It's literally thinking "thoughts and prayers" for homeless people will help them, and deriving some kind of smug moral superiority for that.
I agree that simply having empathy but not backing with efforts is the most hollow of gestures. However, simply saying "well, why don't they live with you" isn't helpful. For another reason beyond what we've discussed, why is it automatically the case that someone who is unhoused would want to live with a stranger? There are myriad justified complaints about congregate shelters and short-term transient housing. The answer isn't "find roommates for everyone," it's "build housing at the rate and income levels needed to house people." But for the howling NIMBYs of the group, we could probably do this. So would it not be more effective to get many of the BS rules blocking housing out of the way?
It's not a short-term fix, but we already know what other short term fixes are that aren't people taking in roommates: buying hotels and converting them, for one; tiny house villages with proper doors and sanitary facilities are another. Not sweeping people from one "unsanctioned" campsite to another with nowhere to go is a third.