If I have a significant other who is also a high earner, then ironically both of our cost of living will go down because of things like splitting rent, splitting groceries, making food at home (easier to shop groceries for 2+ people). A dual income household in SF with good career trajectories can easily put you in the half-a-mil a year range.
It's the kids that make this infinitely more difficult. At that point I'd probably consider moving to a lower COL place. But I'm not sure I want kids - that's a decision for later.
As much as people love to knock on SF, I have a great life here and so do so many others. It's absolutely possible if you're a decent software engineer which is the lens through which I write this comment. Obviously if you're making $60k a year in a commoditized career, you're going to have a bad time. Also if home ownership is that important to you for some reason, then SF probably isn't the place for you either.
I have friends who live in Baltimore and make over $200k+ as software engineers. One guy likes to be thrifty so he bought a house for $150k because it was cheaper than renting. You can't tell me that he would be better off in SF. He would need to be making over $300k to be in a similar financial position. No Startup is going to pay him that kind of money.
I agree the weather is often nice and I love visiting SF but that's a non financial reason.
If he values home ownership, then Baltimore is much better situation for him for sure. If he doesn't, then it becomes much more of a tossup at that point and more variables come into play.
I'm not knocking people who make the choice to do that but don't delude yourself; on a purly financial basis it is not a rational choice.