To be fair, there's plenty of other places in SF that can be built up for low cost homes, not just the high end tourist areas.
And this isn't about blocking rich people's views, for the most part, it's about preserving the view for everyone. Chicago has a similar law that prevents buildings from obstructing the lake view.