Pretty sure it's more a matter of location. Normal people only masturbate in the privacy of their own homes.
I know San Francisco is a very progressive city, but I don't think they're yet ready to embrace homeless people jerking it on the sidewalk outside the library.