Most homelessness is not drug addicts who can't live in society. The vast majority of homeless people are those who can't afford a house, usually due to draconian and unfair zoning restrictions artificially limiting supply and pushing prices past what people can afford.
The people who are drugged out and can't live in society peacefully are more visible, but they are by far the minority.