Not all of the children in To Kill a Mockingbird were ashamed that Atticus had taken on the responsibility of defending the black man, Tom Robinson, of the rape accusation against him. Scout and Jem certainly supported their father, and Dill fell in line with his friends. All three of them were affected by both the testimony and the eventual verdict, since they had all come to the conclusion that Tom was innocent of the charges.
Other children in the story were not so enlightened. Scout's cousin, Francis, mocked her for Atticus' decision, and Francis called Atticus a "nigger-lover." Of course, Francis' own opinion was shaped by other members of his family who thought Atticus was wrong to defend the black man. Cecil Jacobs was another of Scout's schoolmates who taunted her for the same reason. We can assume that Cecil's parents also believed that Atticus was betraying his race for taking the case. Racism was strong in Maycomb and in Alabama, so it was not surprising that many people believed Atticus had made a foolish choice in taking this particular client.
It wasn't so much that Jem and Scout were ashamed of their father defending a black man, but rather had friends/relatives who made the situation more difficult (francis and cecil jacobs causing conflicts from name calling,and most other people of maycomb county and surrounding areas) in the end when they learn the symbolism of all the events and have grown they realize what their father has done and what it means for their lives and their future.