She lived in the East Bay before, so when she finally lost it it was natural to migrate to the nearest large city where she could "live in peace" on the streets.
I think a key problem is not just that the mental institutions are closed, but that it's now impossible to detain them unless they are an immediate threat to themselves or to anybody else. So you can be very sick but if you aren't lying in a pool of your own blood or waving a knife or gun then you are free to do your own thing.
The way I would like to address this would be to build micro communities out in the sticks, fashioned as quasi-monasteries. The energy of the city is not healthy for these people and the programs eat up a lot of cash. My understanding is that SF spends ~$200M/year on homeless services.