Perhaps there is a third option which is a nicer compromise of commuting distance vs housing costs?
It's all a fun spectrum of things you can do, and things people do. If you think of house prices like a heat map, you get a lot of choice into cost vs distance along the spectrum. In addition, this being the bay area, if you're in tech, you have a lot of options open to reduce the burden of commuting. For example, as people get more senior, many start to work from home some days - up to where they're only in the office two days a week. That right there cuts out 60% of the commute cost. Many companies offer buses; they could drive to Gilroy or Morgan Hill and take the bus; this doesn't save time, but it saves 25-50% of the commute cost. Then of course there's carpooling, which you can do anywhere, but makes much more sense 85 miles away than 10 miles away - where I live, carpooling would likely double or triple my commute time so it's a no-go. For them, it might add on an extra five or ten minutes but save half the gas cost, which may well be $20-30 a day. Let's see, now we move on to the realm of fun tricks I've seen: you could fly. Los Banos to Morgan Hill would take only about 20 minutes, though there is the time to get the plane on and off the runway. Or, here's a much simpler alternative: drive during off-peak hours; your two-hour commute turns into an hour fifteen, saving you a hell of a lot of sanity (3/8ths the time saved). And to save on cost, drive a car that doesn't eat 56 cents a mile; plenty are more in the 30 range.
In summary, there are a _lot_ of ways to make it work in such a way that you're not losing money. I won't comment on the loss of sanity...
If it was me in my current situation, it'd be a fairly trivial solution - I'd just drive in after traffic (getting to work around 11) and leave after traffic (10ish); since I love driving, and I know that particular drive is pretty nice when you're relaxed and not in traffic, I could do it. Downside would be less of a social life. I don't feel like doing that, hence, I rent.
I'm not saying it's the best solution, I'm saying that purely money-wise, you can make it work and come out ahead, if you're willing to pick up a part-time job of commuting to and from work in exchange for that money.