Hi,
One can make a question like mentioned but what is the purpose of the question, when you already know the aswer in advance? To express surprise because your surprise seemed to suggest you didn't know that there are female judges in Germany. I was also expressing a little subtle humour.
Supposable the author of my book had a female judge in mind but she did nowhere mention that fact except for the last sentense. I agree that the author could have expressed this a little more clearly. On the other hand, if the author had said 'he', you would not have been surprised or confused. Why would the pronoun 'she' be a surprise or a source of confusion to you?
Best wishes, Clive