SF calls them ADUs(auxiliary dwelling units) and incentivized people to build them.
A lot of people don’t want to because once you’ve rented it out, the tenant can never be kicked out unless they break the law.
Do you want to sign up for someone living in your backyard for the next 20 years?