I'm not sure that nimby behavior can be explained by a desire to maximize the cash value of a single family home. Keep in mind, owners typically own the land their house sits on as well. If I were allowed to purchase a SFH in palo alto, tear it down, and replace it with a four story apartment building, I would probably profit, even at these sky high prices.
This does come up in San Francisco as well. I live in one of the SFH zoned parts of SF, though we are all packed in there, houses are small, not free standing and backyards are small. A friend who lives nearby owns a SFH that is technically zoned R-2. This means that he could technically tear down his house and build two flats. This isn't just theoretical, it has been done on his street. I do believe that the value of the two flats would be considerably greater than the dollar value of his SFH (especially if nobody else did it, but even if it were widespread). He could still live in one of them, with the same square footage he currently has, and with the profits, he could pay off his mortgage and have an impressive chunk of change left over.
Hostility to greater density is a complex issue, but I really don't think that a drive to maximize the dollar value of real estate assets is the major factor here. If people were purely interested in maximizing this dollar value, I think they'd be agitating for the right to build, rather than the right to prevent their neighbors from building.
I think that a lot of bay area nimbys are long time residents who bought when it was less expensive and are well heeled enough that they don't really need the money, and anyway, where would they go? If they cashed in by tearing their house down and making a ton of dough, they'd try to move to... well, a medium density suburb with nice, old, historic houses, pleasant year round weather, a university nearby, a city with a good opera and ballet a moderate drive away, and... oh wait, yeah, palo alto - just. as. it. is.
To me, there's yer trouble.