1) construction costs don't scale down linearly with square footage. Every home needs a kitchen, a heater, a bathroom, a foundation. This makes micro homes much more expensive on per foot basis
2) using construction costs from rural areas with low cost labor. Majority of home construction is labor with materials and overhead the rest. Contractors in SF are highly sought after due to hyper demand and charge double the figures here
3) seismic reinforcement in SF significantly increase construction costs
4) the cheapest anyone ever built anything in dense urban areas is $250/sq ft. My architect here says $350/ft is a challenge in SF for 2000 sq ft build. Good luck!