As a real estate broker, in a fairly dense suburban area, let me comment. San Francisco is quite dense, like the close in sections of most cities.
My area is suburban, but demand for housing continues to justify more, and more dense housing projects. The developer wants the most units per acre he can get. The city SHOULD be zoning in a manner to assure ample parking, for the residents.
The city's motivations are mixed; maximize tax revenue from the new housing, but get adequate parking, so the new residents don't park in nearby areas.
Condos, such as new infill projects are much like older neighborhoods, in that they are very dense.
What they are doing with the parking regulations in SF is trying to get vehicles off the streets, into garages.
Many existing townhome/condo projects have similar rules; can't park personal vehicles in guest spaces. How strictly enforced is case by case.
An additional motive by city government is eliminate illegal bootleg apartments in garages; safety etc.
I looked at a neighborhood in SF called "Outer Sunset" just south of Golden Gate Park. Homes from the 40s and 50s, single family, narrow lots, 2 levels, first level has single garage door, opening into a space large enough for 2+ vehicles, etc.
This space could also accommodate a single car garage area, and a studio apartment. Many likely do so. The city would want as much of the area to be used for parking vehicles, as space on streets is very scarce.
Probably the deal in SF is to get cars into garages, off the streets where parking is so limited.