I think the problem with computer science in general is that it's one of the few careers you need to like at an early age and do a lot of self-directed study before you even enter college, or you are at a disadvantage compared to others. This affects both men and women, and keep in mind most men aren't interested in those fields either.
The point is that you are supposed to struggle with the answer because you can't imagine the doctor to be the boy's mother. That there exists an assumption that people will find this difficult to answer suggests that there is some sort of expected cultural bias about doctors being male or female.
An anecodte, of course- literally.
Sometimes a similar trick anecdote is told about a "German". There's a suspicion that the ending "man" in "German" primes the listener to imagine a man.