Atticus asks whether or not Mayella saw a doctor to stress the fact that her father beat her so they knew she did not need one.
Tom Robinson is being tried for the rape of Mayella Ewell. Normally in a rape case the victim would see a doctor. Atticus asks Heck Tate, the sheriff, if he called for a doctor.
"Well I can tell you why I didn't. It wasn't necessary, Mr. Finch.
She was mighty banged up. Something sho' happened, it was obvious."
"But you didn't call a doctor? While you were there did anyone send for one, fetch one, carry her to one?" (ch 17)
During his cross-examination, Atticus asks over and over again if Mayella saw a doctor. He asks the question so often that the judge scolds him and tells him to move on.
Atticus also asks Bob Ewell why no one ran for a doctor, since "folks were doing a lot of running that night." He asks if Ewell was concerned about her condition. Ewell thinks about it and says that calling a doctor would cost five dollars, and he had never called one in his life.
The questions about the doctor are meant to convince the jury that everyone knew Mayella was not raped. Her injuries were from her father hitting her, not from Tom Robinson attacking her. There was no reason to go for a doctor, because there was no rape.
When Sheriff Tate and Bob Ewell are on the witness stand, Atticus repeatedly asks them if a doctor was called after Mayella was purportedly raped so that the jury will hear and, hopefully, question Ewell's credibility. Also, by continuing to question Ewell, Atticus may arouse the man's anger and get him to say something that discredits the veracity of a previous remark.
In addition to these reasons, there may be another one for Atticus's repeating his question to Heck Tate: By asking the sheriff if a doctor were called, Atticus establishes that Mr. Tate must have had his doubts that a rape occurred or that Mayella was hurt badly. He testified that he helped her up after seeing that she was beaten, and, after she washed her face, Mayella said she was all right. He did ask her if she had been "taken advantage of," and Mayella replied affirmatively.
Interestingly, when Judge Taylor breaks in on Atticus's repetition of the question of obtaining a doctor, he says, "He's answered the question three times, Atticus" and Atticus replies, "I just wanted to make sure, Judge," Judge Taylor smiles. Judge Taylor understands what Atticus is doing. By asking the same question, Atticus establishes that Mayella has not been injured internally. While her father is purportedly so outraged and "concerned" about his daughter that he brings formal charges against Tom Robinson, he does not even take his daughter to the doctor so he could have the supposed act of rape medically documented as absolute proof. Too crass to understand why Atticus repeats his question, Ewell has unknowingly raised doubts about himself.