Scout (and sometimes the reader) is understandably confused. Why are the townspeople upset that Atticus is going to do his job? The answer lays in the race relations in the south at the time.
According to U.S. law, anyone accused of a crime who cannot afford a lawyer can have one appointed by the court. It is the job of this public defender to represent the client fairly, giving him or her the best defense possible. Atticus was appointed to defend Tom Robinson against the charge of raping a young white woman, Mayella Ewell.
Scout understands this part clearly enough. However, in her racially charged society at that time, justice was not meted out equally. African Americans did not generally receive fair trials. Remember, this is a time when they were treated as second-class citizens. They could not share restaurants, transportation, or even stores, with whites.
The general sentiment throughout Maycomb was that Atticus should do the absolute minimal amount possible to help Tom Robinson. Certainly, Atticus should not seriously defend an African American in a case involving a white woman. Because she was white, she must be right.
When it became clear that Atticus intended to mount the same high quality defense he would give to a white man, the townspeople were shocked. It was a betrayal of a deeply ingrained understanding in Southern society: African Americans were not equal to whites, and anyone who treated them as equals was violating a valued social order.
Therefore, the people of Maycomb could accept that Atticus was appointed to defend Tom Robinson. After all, someone had to be. What they resented was that Atticus treated Tom the same way he would have treated a white man. He was not going to just go through the motions of a trial; he was going to adamantly defend him in court. That was unacceptable in the town’s eyes. Atticus was expected to give Tom as little help as possible.
The fact that Atticus took a stand against the expectations of the town in order to maintain his personal integrity establishes both theme and conflict in the novel.