California building code design requirements for bathrooms
No, that is totally untrue. There are plenty of rules for bathrooms, but what you are describing would make all "master bathrooms" that are only accessible from the master bedroom illegal, and that is definitely NOT the case. And it is perfectly legal to have two "master bedrooms" in a house, in fact it is becoming a desirable feature on smaller houses because of the proliferation of shared housing.

Now, if you don't have a bathroom accessible from the general living area it means all of your guests must go through a bedroom to use the bathroom, something that I personally would not want. But that is not codified anywhere.