That is, if your only consideration is financial; which is an equally irrational way to live your life. You have to consider the social cost of uprooting yourself and moving around - there is huge value in building not just a "network" but an actual group of friends, other families, etc. to form community. This of course is something often missed by the sort of small-souled bugmen that are attracted to working at high-value Silicon Valley jobs, "changing the world" by "disrupting" the way people deliver pizza or call a cab. (Imagine pouring out your best years slaving away at something so meaningless!)
If you spend the early years of your career living in an $2000/mo room in some bunkhouse, not developing real connections with anyone, and then drop out of the sky in another city as you approach 30, don't be surprised if you've missed out on many of the other things that actually make life worth living, and don't be surprised if you've paid other opportunity costs. Maybe you miss out on finding the love of your life, or don't find them until you're too old to start a family. Maybe you find yourself permanently rootless, unable to form a cohesive friend group, perhaps even skeptical that they actually exist.
Or just notice all the human shit on the street in SF and realize that you could actually live somewhere you honestly liked to be. It's that simple.
So what you need to think about is this: if you would be putting away, say, $50k less a year in Vancouver, it's essentially like you're paying $50k more to live there. Is it worth it to you?
Compared to San Fran, it has a more hospitable and interesting climate, the culture is perhaps less vivacious but definitely safer and more genteel, the outdoors and recreation opportunities nearby blow away anything in California, and the fact that the local institutions and governments are still relatively well-run has a positive impact on the long term stability of the place.
The question is: are you looking for somewhere to _live_, to settle, to raise a family, to put down roots? Are you looking for somewhere to be _from_? Or are you a member of the globetrotting class, working wherever you feel like, being _from_ nowhere?
If the latter, then you may as well follow the money for as long as you can. If the former, then it may well be worth some numeric financial sacrifices in order to actually have a better life. There's probably plenty of equivalents in "flyover" states and the like, where you can live for cheap and be safe and stable relative to the major cities.