You make a very good point. It's not just about "unintentional" discrimination though - there is very intentional discrimination as well.
There is a very long history of women being treated more poorly in employment. This was only first addressed by the Equal Pay Act 1970 and there are still battles being fought in court today. For example
https://www.theguardian.com/commentisfree/2024/mar/13/birmingham-council-bankruptcy-equal-pay-women
or here:
"The women, who worked for the Council as cooks, cleaners and care staff, had previously been denied bonuses worth up to 160% of their basic salaries, which had been given to male staff who did work rated as equivalent to theirs.
[...]
The BBC have reported that at the time that these women were working for Birmingham City Council, the annual salary of a female manual grade 2 worker was £11,127, while the equivalent male salary was £30,599, plus an additional bonus of up to £15,000 per year."
https://www.anthonycollins.com/insights/news/landmark-ruling-equal-pay/
and these fights are still going on, especially in the retail sector.
But, in some areas, the pendulum has swung so far in the name of "equity" that people are being unlawfully discriminated against in the name of "diversity".
Just a couple of examples:
The BBC recently reported that in the Thames Valley Police, two men and a woman were deliberately excluded from a promotion purely on the grounds that they were white British
https://www.bbc.co.uk/news/articles/cly8n6r6glgo
Even back in 2019 the BBC reported that a candidate for the Cheshire Police was rejected on the grounds that he was a "white heterosexual male"
https://www.bbc.co.uk/news/uk-england-merseyside-47335859
Discrimination based on any unlawful grounds should rightfully be called out.