Miss Caroline is not only an inexperienced teacher; she is also a "foreigner" to Maycomb County. In Scout's precocious eyes, these are both marks against her first teacher.
Miss Caroline's inexperience causes her to become defensive when she discovers that Scout can read. Instead of being impressed or praising Scout, she insists that Scout no longer read at home. Of course, this does not sit well with Scout.
Later, when Miss Caroline insensitively offers little Walter Cunningham charity in front of the other students, Scout--in an attempt to assist Miss Caroline--informs her of the Cunningham family's ways. Miss Caroline does not appreciate a first grader telling her how things are done and punishes Scout.
Lee includes these incidents with Miss Caroline to satirize the flaws she had recognized in America's educational institutions. She obviously felt that students with talents and academic abilities were held back by inexperienced or bullheaded teachers and that what was taught in schools was not useful for every day life (hence, Jem's discussion about learning the Dewey Decimal System).
The author also includes the Cunningham scene to illustrate Maycomb's idiosynchracies, incomprehensible to outsiders.