In fact, if the police are as bad as you say they are, then not making things legally simple and clear is even worse for these situations!
If the law clearly says: "assigned sex in the birth certificate" == "assigned bathroom", then it's much easier to argue to the police that you're using the right bathroom (although again, I wouldn't use the birth certificate as it probably can't be changed).
If you don't have a clear and simple law like that one, and your sex is somewhat ambiguous, good luck trying to convince the police that you're using the right bathroom!
In fact, the example you used is a good one: the police probably didn't believe your acquaintance precisely because such treaty laws are so long and complex, with lots of edge cases that are outside the norm (and therefore unlikely for your standard police officer to be aware of).