If they had to pay rent they would at least be filtering for people who have enough stability/responsibility to have some kind of job or income.
"Just give them housing" does not work for people who have no idea how or desire to live in a house.
Living/loitering/begging/shitting on the streets should not be permitted. Institutionalization may be needed if addictions or severe mental health issues are involved. But expectations need to be higher. Sympathy for and tolerance of antisocial behavior have been utter failures.