The prices are directly a result of the Bay Area's beauty. The whole reason the prices are so high is that the city has been absolute in its refusal to let people build giant hideous skyscrapers that would block the view of the bay. Those same ugly monstrosities would provide hundreds of apartments and dig the city out of its ridiculous housing shortage.
Rents are high because demand is high and supply is low. Demand is high because there are lots of jobs there. Supply is low because the city refuses to allow high density development. It's a great deal for the people who already own homes and are planning to move out. They can sell their homes for a fortune and live like a king somewhere else.