Mrs. Dubose is a prime example to support the idea that "things (and people) are not always what they seem."
Mrs. Dubose is characterized as mean, frightening, loud, and relentless by the children. She is portrayed as exactly as racist as the rest of the town of Maycomb when she uses the n-word, especially after the reader hears Atticus' explaination of the n-word to Scout: "It's common." Despite this negative portayal of her, she is treated like a lady of high society by Atticus himself. "Good evening, Mrs. Dubose..."
Of course, when we find out she spends her dying days battling a morphine addiction (successfully no less), suddenly all prior perceptions change. How much of what came out of her mouth and off the front porch was truly her? How much were the drugs talking? What kind of pain must she have once suffered to be addicted to morphine in the first place? We never get any background on the old woman, except the frightened and narrow minded ideas of a child.
Since Mrs. Dubose might be considered an "enemy" of the Finch family, this is a chance to know the enemy and why she/he acts the way they do. Mrs. Dubose is old and cantankerous, unlike anyone else in Maycomb that the children know. This is an opportunity to view first hand the ravages of age, and the ravages of prejudice. Jem lost control when he destroyed the old woman's camillias, just as she loses control when she shouts the things that are hurtful to the children. Jem must learn the consequences for losing control by confronting the source of his outburst. He must "walk around in her skin" to understand what drives her, and learn how to deal with unpleasant people. The consequence fits the crime, having to spend his free time up close and personal with his tormentor. Jem had to do something he didn't want to and, in return, learned from it.
Atticus also had to do something he didn't want to, use a weapon to kill something. From the hints in the story, I got the impression Atticus had had to kill someone or something using his deadly aim. He was touched by this killing and resolved not to have to do such a thing again. When the dog, Old Tim Johnson, presented signs of rabies, he was a danger not only to Atticus's children but to the towns' people as well. Despite is distaste for killing, he he forced himself to do what was right with his children watching.
Both of these actions took courage. Facing what is distasteful and dealing with it head on is something many people do not have the courage to do.
To me, another reason the Mrs. Dubose incident is important is because it shows how important Atticus thinks the idea of "turn the other cheek" is. In this episode he shows that he does not think that you should take revenge on people who treat you poorly.
In this episode, Jem digs up Mrs. Dubose's flowers in revenge. She has been saying horrible things about Jem and Scout and Atticus. Atticus makes it clear to the kids that you do not do that -- you just take it when people do things like that to you.