Yes. There are a lot of homeless and drug addicts in SoMa. SoMa is home to a notorious black market meeting area for the day's haul of stolen goods. Late at night drunk/drugged/insane people will wander in the middle of the streets, adding to the city's pedestrian-vehicle collision stats.
Important to note SoMa is one of the biggest neighborhoods in S.F. kind of a catchall for everything South of Market that didn't already have a name. One of the wealthier areas is trying to rename itself "East Cut". Also the entire area has dramatically improved in the past couple decades. It's relatively safe for anyone, just somewhat more troubled than most other neighborhoods.