For a number of reasons, female physicians don’t work as much over their careers as men statistically. I’m guessing that this is why med schools might practice this unsavory discrimination against women. It’s really unfair to individuals that might or might not go on to make more important contributors to the field than the average male doctor.
I was married to a brilliant woman that went to medical school at a time when there was much more overt sexism in the field. Her abilities were unusual; she was always near the top of her class, and in a field like medicine this provided some protection from prejudice. However, women shouldn’t have to be better than their colleagues to simply survive medical training.
Personally, about half my doctors are now female and I’m very happy with them.