Discrimination means unjust treatment which this would not be though.
Not exclusively it doesn't.
recognition and understanding of the difference between one thing and another.
"discrimination between right and wrong"
We discriminate all the time.
We discriminate against adults being taught in a primary school. I discriminate against all women in terms of my sexual orientation.
We discriminate against sex offenders being allowed to work with children.
What you can't have is discrimination based on sex, unless it's in certain situations.
It was mostly designed to stop women being disadvantaged!
But it was understood that there were situations under which you absolutely would discriminate. Sexual orientation being one of them. Which is another protected characteristic in law.
it's just that no one thought they would have to qualify the law to explain that rapists shouldn't be women's prisons, men competing in women's sports, or using female facilities.
That's why we need clarity.