Atticus' question concerning whether a doctor was called to treat Mayella is also asked to show the jury that there is no direct evidence of rape. Although the story takes place long before the present-day "rape kit" examination became a staple investigative procedure, a doctor could have examined Mayella and determined whether a rape took place. Since no doctor was called, there is no direct evidence. Of course, Bob knew this beforehand, since the whole story of Bob raping Mayella was concocted by him. Unfortunately for Tom, the jury did not take this lack of evidence seriously.
This is from Chapter 17 in the book.
What Atticus is trying to do here is to prove that Bob Ewell knew exactly how hurt Mayella was. He knew exactly what had happened to her because he was the one who beat her. He beat her after seeing her hugging Tom Robinson.
If he had really thought that Robinson had beaten and raped her, he would have called for a doctor to find out how badly she was hurt. But he did not need to do that because he already knew. That is what Atticus is trying to show.