There's a big difference between making your own choices and forcing other people to make your choices, which is what density restrictions do. Housing markets reflect the collective desires of people that live in an area, and SF housing markets are begging on their hands and knees for density. It's the urban planners that are standing in their way.
The most maddening thing for me about this issue is that removing density restrictions in inner cities actually makes it easier to live in a detached single-family unit with two cars, since more people living downtown means fewer people competing to use space and freeways out in the suburbs.
I don't think it's purely the urban planners, as if they've usurped power against residents' wishes. The desire of would-be new residents may be for density (which is what markets would reflect), but in much of the SF Bay Area, the desire of current residents is in the opposite direction, which is what their elected officials and planning boards therefore implement. So that's another kind of collective desire, but of a different collection. Places like Palo Alto, for example, retain rules requiring single-family homes with certain minimum lot sizes, because that's what Palo Alto residents want their city to be like.
You actually get that in the private sector as well, if a municipality doesn't set such rules. The neighborhood I grew up in in Houston had minimum lot sizes and restrictions on subdividing houses for rental, all implemented via contract law. When the subdivision was built, all buyers agreed to set up a homeowners' association and certain rules, which are now conditions attached to the deeds. In an alternate world where Palo Alto had been set up that way N years ago, with subdivision organizations and contract law mandating lot sizes, rather than municipal government setting them, the end effect seems like it would be largely the same, so it doesn't really seem like a government vs. market distinction (at least, unless you restrict freedom of contract enough to make this kind of private-sector zoning impossible).
These sorts of restrictions are all wildly inefficient. Buying property doesn't buy you the right to control how the composition of the area changes with time. If you've got 10 people in a neighborhood with single family homes, and 100 people who want to move into the neighborhood into high density apartments, why should the minority be able to override what the market demands?
But the market is what set up the restrictions in the first place, in Houston's case! They're just private-sector agreements in contract law that you agree not to do X/Y/Z to your property, in return for your neighbors agreeing to the same.
Is the argument that people shouldn't be able to agree to a contract saying, "I will not subdivide this land, and will only sell it to someone who agrees to the same condition"? I'm not entirely averse to that, but it seems like it's a more complex issue than just allowing whatever the market demands, because there's market demand for these restrictive covenants (people really do sometimes want reciprocal agreements with their neighbors about what each will do with their land), which would have to be prohibited by restricting what kinds of contracts people are allowed to sign.
Just because something is achieved contractually does not mean it doesn't undermine market mechanisms. Cartels are contractual but that still undermines the market.
There is a proposition in the law of property that restraints on the alienation of land are to be avoided whenever possible. restrictions on alienation reduce the fungibility of property and increase transaction costs, reducing efficiency. In some states, e.g. NY, there are limits on what sorts of restrictions on alienation courts will enforce when written into deeds.
The most maddening thing for me about this issue is that removing density restrictions in inner cities actually makes it easier to live in a detached single-family unit with two cars, since more people living downtown means fewer people competing to use space and freeways out in the suburbs.