In addition to asking Heck Tate if a doctor was ever called repeatedly, he also spends a great deal of time reinforcing the fact that Mayella Ewell was struck on the right side of her face by someone using their left hand. He asks Tate to recall correctly which side of the face Mayella was struck on, then asks again to be certain that the sheriff is remembering correctly. Both questions (the doctor questions and the battery questions) are dwelled upon by Atticus to show the jury that his client is innocent.
In chapter 17 Atticus asks Heck Tate if a doctor was ever called. The reason he repeats this question is to make it obvious to the jury (and judge) that no doctor was ever called. Because there was no doctor involved, there is no evidence that proves that she was beaten and raped. With no evidence, there is no case against Tom. The judge breaks into the examination and said,
"He's answered the question three times, Atticus. He didn't call a doctor."
Atticus replies to that,
"I just wanted to make sure, Judge." At that comment, the judge smiled at Atticus. He knew what Atticus was implying. He was even helping to point it out by interrupting.
In Chapter 17 of To Kill a Mockingbird, Mr. Heck Tate, the town sheriff, takes the stand in order to testify. While being examined by the solicitor, Mr. Gilmer, Tate states that he was summoned on the night of November 21st by Mr. Bob Ewell, who came to his office and claimed that his daughter Mayella had been raped.
Tate says that when he arrived at the Ewell family's house, he found Mayella lying on the floor—having been severely beaten—and that Mayella claimed that Tom Robinson was the man who raped and attacked her. This resulted in Tate immediately bringing Tom in without questioning the circumstances around the attack.
Atticus responds to this testimony by repeatedly asking, "Did you call a doctor, Sheriff? Did anybody call a doctor?" Tate reacts defensively to this question, asserting that it was "obvious" that something had happened and, thus, calling a doctor was unnecessary. Atticus continues to pursue the question anyway until Judge Taylor interrupts him. Atticus uses this approach to plant seeds of doubt in the mind of the jury: if no doctor was called to evaluate Mayella's injuries, was it possible that she was not even assaulted? Or was it possible that the assault was the result of some other man's actions?