Why do you think the author put in the encounter between Calpurnia and Lula?
Think about the reasonableness of Lula's position. Wouldn't you ne tempted to agree if you lived in a segregated society? What does Harper Lee establish about the black congregration, the black community, by their response to Lula.
I think Lula did what many of the folks might have been thinking about doing. Allowing Lula to create the confrontation gave all characters the opportunity to see the absurdity of Lula's position. They disapproved of her outburst and the way it came across to the innocent children who were flesh and blood of the only man in the society willing to stick out his neck for a black brother.
I think this situation further demonstrated Calpurnia's ability to live appropriately in both worlds. The rest of the black community might not have appreciated that in her, but Atticus' response to the Robinson case might have been in part due to his good relationship with Cal.
I believe what this encounter does display is that racism can be a two-way street. Just as there were members of Maycomb's white society who looked down upon the black man, there were also Negroes in Maycomb who held similar views about their white counterparts. In this particular scene, it does represent that Lula was in the minority among her church brethren, since no one came to her side in order to echo her sentiments. One may assume that Maycomb's black society was more tolerant to the appearance of white faces in their church congregation than the all-white churches in Maycomb would have been with the unexpected attendance of Negroes. However, many Negroes of the time would have probably shown a reluctance to voice a strong opinion against the ruling white society; racist or not, Lula does show courage in saying what's on her mind at a time when few others would. One must wonder if Atticus' and Miss Maudie's reluctance to regularly attend church had anything to do with the segregated nature of the congregations.
In my opinion, the author is trying to do the following things when she has Lula reject the white children (and the rest of the congregation embrace them).
I think that she is trying to show that the black community is not monolithic -- it has differences of opinion within it.
I think that she is also trying to show that most of the black community is tolerant. This is meant to be a contrast with the white community where only a few are tolerant and almost everyone else is not.