You (intentionally?) missed the part where hobos get bounced out at the front door.
You've also pretty clearly not been in either of the Macy's buildings. [0] They, -too- (just like the other large department stores that have been operating in the area for decades) are so large that the employees on the floor cannot see what's going on across the entire floor with a glance.
[0] Well, they _used_ to have two. Since a year or two ago, they closed their menswear building and consolidated in a single building.
This issue is a new issue --it's not decades long. It's only become an issue since intersection of prop 47 with SF governance. This is why companies are only beginning to pull out now.
Unbelievably, SF already had loitering and vagrancy laws on the books, but the panhandle had to have a new more specific ordinance to address druggies blocking doorway entrances etc (the sit/lie law), of course, in typical fashion, it could only be enforced after a written warning and after a second it became a misdemeanor...
It's just easier and better to find a place that's friendlier to business.
Sit/lie in SF is from 2010, ~13 years ago.
SF has been in a commercial decline for a whole bunch of reasons.
Despite that, front-door bouncers have continued to be -as far as I could tell, as a customer of these establishments- more-or-less totally effective at keeping hobos out.