Anyone who fails the tests for the other cases you list. The governing body of the sport gets to decide, and tests are decided by scientists and doctors.
For the same reason anyone wants to know anything. Because if anyone is to have an informed conversation about this, we need to know how they come to their conclusions. Their lack of transparency is a large part of why this controversy exists in the first place.
Which do you think would be more likely to discourage girls and women from participating in competitive sports, the chance that they might have to compete against a "real" woman or the requirement that they let everyone else know about their private medical records?