I still do not think it is discrimination due to physical inequality. Men use urinals that women would not need as they could not use them and women have tampon stations that they use. If the bathroom is modern and in a public place, both men's and women's bathrooms have diaper changing stations. With the difference in body types, and how people of both genders want privacy, rather than creating a bathroom full of everybody, separating them just makes for common sense. People feel insecure enough as it is, young children should not have to walk into a bathroom with the risk of seeing a grown man's penis, etc.
Discrimination as a term, I guess, is not always of a negative connotation. All it means is a separation on the grounds of something. If that separation is unlawful based on civil liberties, then that is wrong. However, hirings based on certain announced traits if the job itself depends on those traits is not unlawful discrimination because the person is told beforehand that their hiring depends on these traits. Barring Jews from working at your store though would be discrimination if you were basing that barring on what they were and not what they would be required to do.
Something like barring black people from living in a condominium even if they are able to pay just as everyone else, then that is wrong; however, if they or anyone acted disruptive and caused complaints that could be interpreted as not motivated by the race of the person, then they could be kicked out. I guess you could get away with some discrimination so long as you kept your opinions hidden so it could not be proven to be based on it.
As for gay marriages, I do not know much more about them other than they change the wording. As for the original question of this topic, it goes to the biological mother or it just goes to whoever. The marriage itself is meant to be done as "normally" as possible, it really doesn't deviate that much. In fact, there are heterosexual weddings that are stranger.