My town has built several "transition" apartment buildings for the homeless to give them a "stable" place to live while they in theory get their lives together. They quickly became shitholes, residents destroyed the apartments and especially the common areas/hallways/elevators. They also let any number of acquaintances into the buildings and the apartments, further contributing to the destruction. Half the units are uninhabitable as a result.
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.