That's not really "shocking wealth inequality", but more like a
shocking display of wealth inequality.
Most cities around the developed world will spend more effort to herd the "undesirables" into some corners far away from fancy shopping districts. We can debate the pros and cons (after all, nobody benefits from having to avoid human feces on sidewalk), but I don't think SF has much more actual inequality than most other cities.