The vast majority of tech offices are in Soma with some in Financial district. There are literally tens of thousands of pedestrians and tourists walking around and workers going to offices everyday in that area.
It is not a dystopian hellhole like you are describing, it's not even as bad as the Tenderloin.