"Mentally ill" is a deflection that waters down the statistics. People with a combination of schizophrenia or bipolar disorder and substance abuse problems are more likely -- I believe 5-7x more to engage in violent behavior.
I worked in a central business district (not SFO) in a large office building where I'm personally aware of at least a dozen muggings and a half dozen attempted rapes by homeless people who turned out to be suffering from that combo. The company hired valets and provided escorts to employees, particular female employees to parking and mass transit. Eventually a change in local administration brought a police crackdown that resoled the problem.
That's not to say that all homeless people or people struggling with various maladies are all bad. But they do present a higher risk, and it's not unreasonable for people to want to keep a wide berth.