As someone who owns in SF, this is definitely not the case here.
For a $1.5M home in SF, the total monthly outlay includes mortgage ($5,557 @ 3.75% with 20% down), property taxes ($1,454), property insurance ($2,250) for a grand total of $9,262 per month. You could rent the same house for $6,000 per month. And that doesn't even include expected maintenance ($625 per month) and opportunity cost of your $300,000 down payment ($1,250 @ 5%). So grand total, you're spending over $11,000 per month or $5,000 more than the cost of renting.
The reason for this is appreciation. If you're house goes up in value by 5% per year, that $75,000 that more than covers the extra $60,000 you're paying over renting. Question is - will it keep going up that much?
Edit: updated with actual numbers.