I think to some extent it arises from stupidity, lack of common sense and the inability to think things through logically.
A: In the past it was legal to treat people from minority ethnic groups, women and gay people worse than other people just because of who they were.
B: Oh wow, that's awful. Nobody should ever be excluded just because of who they are! The people doing the excluding are terrible bigots.
A: And now some people want to treat the trans community worse than other people just because of who they are! They're being treated just like Black people in the deep south.
What is lacking here, of course, is B having a little think about this and saying But hang on a minute, I thought women were treated badly in the past? Is that why they have these special spaces and services, not so they can keep other oppressed people out and preserve their privileged status even though it makes them unkind, but to keep them safe and maintain their privacy and dignity? How would that be affected if they had to let males in?
But that would require B to take the risk of being labelled a bigot and (gasp) UNKIND and take the risk of being ostracised, sacked etc etc, so it hasn't happened much. Plus, of course. the education system has badly let a lot of young people down by not training them to think for themselves and learn how to argue their point and critically evaluate other people's arguments.