If it made a difference to your ability to get shelter, which would you rather choose: have shelter or live in a illegal tent under a bridge resting assured with the knowledge that there's a big book of rules in place.
Not all buildings in SF are high-rise open-plans. If you're imagining converting Salesforce tower, I see how that would seem impractical.
Most commercial office space in SOMA (old warehouse buildings) can be converted into live/work lofts.
Building Codes are words on paper. They can be changed more easily than physical buildings.
A dorm (ie. shared bathrooms/kitchen) wouldn't have this issue.
Check out 510 Townsend, one of the properties mentioned in the OP. What do you think about converting buildings like 510 Townsend into live/work lofts?