That scene takes place in Chapter 18, which is one of the trial scenes. Mayella Ewell is on the witness stand to testify against her alleged rapist.
First, she is interviewed by the prosecuting counsel, Mr. Gilmer. At first, she is hesitant to testify at all, and even bursts into tears. It emerges that she is afraid of Atticus, because she has just seen him trap her father into admitting that he is left-handed.
Atticus begins to cross-examine her in a very polite and reassuring manner, calling her "Miss Mayella" and even "ma'am."
"Won't answer a word you say long as you keep on mockin' me," she said.
"Ma'am?" said Atticus, startled.
"Long's you keep on makin' fun o'me."
Judge Taylor said, "Mr. Finch is not making fun of you. What's the matter with you?"
"Long's he keeps on callin' me ma'am and sayin' Miss Mayella. I don't hafta take his sass, I ain't called upon to take it."
In other words, it was Atticus' polite words that Mayella took for mockery.
Obviously she has never been treated with respect or courtesy. In fact, she has always been treated with such great disrespect that the only way she can interpret respect, when it is shown to her, is as sarcasm.
This shows that, not only do her father and siblings never show courtesy, she has also never been treated with courtesy by anyone in Maycomb. This might be because she and her family are such outcasts, but it is more likely because she never has any reason or means to go into town.