Harper Lee relies on Scout's innocence, curiosity, and precociousness to illustrate Atticus' unbiased treatment of African-Americans.
First, Atticus entrusts Scout and Jem to Calpurnia. She is not simply a cook or servant. Calpurnia is a vital part of the Finch family--she teaches Scout morals and ethics; she watches over the children when Atticus has to be away. Because of Calpurnia's "mother-child" relationship with Scout (encouraged by Atticus), Scout does not see race when she looks at others.
Scout's curiosity and perceptiveness cause her to ask her father questions not only about the trial but also about puzzling incidents that she witnesses. Atticus' replies to Scout's questions portray Harper Lee's beliefs, too, on race issues. When Jem and Scout ask their father about the trial because they simply cannot believe that Tom Robinson was found guilty after Atticus' masterful handling of the case, he has opportunity to express how justice should work versus how it does work in Maycomb because of racial prejudice.
Harper Lee uses Scout as a vehicle to ask the kinds of innocent questions that make Atticus explain why he is defending an African-American man, Tom Robinson, in simple and honest terms. For example, Scout asks Atticus, "Do all lawyers defend n-Negroes, Atticus?” She at first thinks that defending an African-American person is something to be ashamed of, like running an illegal still, because people in town are criticizing Atticus for doing so. Instead, Atticus explains to her in terms that a child can understand that defending Tom is the ethical and right thing to do. He tells her that if he didn't defend Tom, "I couldn’t hold up my head in town, I couldn’t represent this county in the legislature, I couldn’t even tell you or Jem not to do something again.” In other words, he explains to her in an easily comprehensible way that defending an African-American person is not only not evil but is part of being ethical and moral.
Scout's questioning allows Atticus to explain in simple terms why racism is wrong and why everyone deserves a fair trial. Scout asks the kinds of innocent questions that a child encountering racism for the first time would naturally ask, and Atticus's answers explain why he thinks she should reject society's racism and choose fairness and decency instead.