That's the way some politicians/media try to spin it, but it's not the whole story.
Many homeless don't have mental health and substance abuse issues, but are just forced out of their homes on debt, etc. And of course some develop mental health (and sometimes substance abuse issues) after living homeless.