Same with housing stock. If you only have gigantic housing units that only the ultra-rich can afford, poorer people get pushed out the city even faster compared to a housing stock with many smaller (and thereby affordable) units. Preventing parties from eradicating this stock again is a protective measure for people who rely on this housing stock to have a home in the city.
Of course mergers/divisions can still happen, but it has to be approved by the municipality.
The popularity / trend of either mergers or divisions purely based on the market may change every five years or it may swing one way for decades. The point of these laws is for the municipality to exert control over this, because it's an elected body with normative ideas about what the city should look like and who should be able to live there.
A protective law for small units doesn't negate that at the same time there could be good reason to have a protective law for large units.
Second, my city doesn't just do it to control the overal housing stock. It also does it to steer individual neighbourhoods a certain way. It may be that the aggregate distribution of small and large units is completely fine in the city, but that one neighbourhood has only family units, and another only single-person units. It tends to be that, while some concentration/clustering of characteristics is helpful (e.g. a family vs a student neighbourhood), it's also healthy for a neighbourhood to maintain a bit of a mix. Healthy municipalities of highly livable cities often try to steer this mix, such that you don't end up with de facto segregation. Rich and poor, young and old, educated and uneducated, various ethnicities and trades all living together instead of segregated. This also means municipalities tend to want to create laws to protect a certain size of housing stock, could be small or large units, by requiring approval for both mergers and divisions, to protect certain citizen's groups. The fact laws for both mergers and divisions exist certainly isn't necessarily strange.
Anyway I'm relatively unfamiliar with SF, never lived there, so honestly I've got no clue what's actually happening here.
I’m not saying there isn’t a housing issue in the Bay Area, there is, but that separate from private property. City gov is making it difficult for all but the most expensive developments to become viable. There is seemingly no way to build middle class housing in SF and be profitable.
There is a rental shortage in the city, thus rental prices are going higher. The more rentals that leave the market, theoretically, the higher rent goes.