Having a roof + support is one of the fundamental parts of treating mental health however.
Can't just shove them in a house and all good, but its a fundamental part of treatment along with social programs. Without stability it's tough to change much in someone's life.