Above all it is drug addiction/alcoholism.
Drugs make one mentally ill.
See on youtube "Seattle is Dying," where the cops state it is addiction.
Generally there are adequate "resources," but homeless don't want such, since it involves conditions, like curfew, drug tests, etc.
By the time they hit the streets, they have burned other bridges, like spouse, parents, friends, etc.
It used to be families, jails, prisons, kept them off the streets.
Now they get dumped io to our streets, parkks, beaches etc.