I wouldn't say it's just about biology. Sexual attraction is a factor too, perhaps even more important. That's certainly the idea behind talking about predators. Would you rather use the bathroom or change in a locker room with a gay person of the same gender or a gay person of the opposite gender?
That may have been the intention, but it's an even worse distinction. There are far, far more gay people than there are trans people. And how are you going to control their use of restroom, as there's no definitive test for homosexuality?