In case you're not being obtuse, the Fair Housing Act: https://en.wikipedia.org/wiki/Fair_Housing_Act
It applies to rentals of full properties, but not to roommates or (some) owner occupied properties.
Intentionally obtuse it is!
The reason it's permissible is because the exception is permitted under the Act. It's not predicated on some vague legal principal (nor, for that matter, is your example - that's a policy reason, not a legal one).
If you want the policy justification for permitting discrimination in one case but not the other, it's exactly what you outline above: there is a significant difference between renting out a portion of your own home, and renting a property exclusively for business purposes (i.e. real estate investment): https://fairhousing.foxrothschild.com/2010/06/articles/fha-b...
Is that an accurate assessment of the logic, or is there a more charitable explanation?
> There seems to be some underlying principle that we'll ask you to put your property & other tenants' lives at risk in the service of Ending Discrimination, but not your own
Seriously? If you think that renting to minorities or other protected classes means "putting your property & other tenants' lives at risk," then I just don't know what to tell you here.
In California, if there is exactly one roomer in an owner-occupied, single-family home, its legal to discriminate on just about any basis -- but not to advertise a preference.
Except if there are also shared living spaces that will be used, in which case it is also legal to advertise a gender preference.
See, "Limited exceptions for single rooms and roommates", at http://www.dca.ca.gov/publications/landlordbook/discriminati...