It’s expensive to stay there as well. I have immediate family in SF - we used to stay at a ho-hum, run of the mill Holiday Inn that was $350/night.
When visiting in the SF area I used to stay in Newark, CA.
It seemed to be a bedroom community for Silicon Valley.
I think I paid $38/night around 2005 for a decent motel.