I am glad you escaped any serious injury.
Too bad no one but the priviledged few can get a concealed carry permit in SF, or most urban CA counties, for that matter.
You are absolutely correct about the police. They function as a sort of crime historian, and perhaps to some degree as bringing justice. But, they can seldom prevent crimes, except in a broad statistical sense, such as when their presence is more noticeable.