Every main character needs to be flawed in some way. After all, who's going to care about a main character that's perfect? No one, that's who.
And when it comes to flaws, the first thing Elizabeth Gaskell wants us to know about Margaret Hale is that she is a proud young woman. We learn this in only the second paragraph of the book, where we find out that on the eve of her cousin's wedding, Margaret can't bring herself to compliment the prettiness of another woman. As the narrator tells us, "They had grown up together from childhood, and all along Edith had been remarked upon by everyone, except Margaret, for her prettiness" (1.2). It's subtle, but the pride and jealousy are definitely there.
If that early hint wasn't enough, the narrator gives us a sense of Margaret's pride through physical description. When talking about Margaret's face, the narrator mentions that "Her mouth was wide; no rosebud that could open only just enough to let out a 'yes' and 'no,' and 'an't please you, sir'" (1.2.4). In other words, Margaret isn't like most young women of her time, who are shy and afraid to speak their minds. She's the opposite: having a wide mouth that signifies how much she likes to speak when she has an opinion.
Even when she's caught in a compromising situation, Margaret won't allow any other character in the book to question her. When Mrs. Thornton of Milton confronts her about walking alone at night with a young man, Margaret answers with indignation, saying, "What must you think of me, madam? […] You can say nothing more, Mrs. Thornton. I decline every attempt to justify myself for anything" (2.13.66). In other words, she's not about to go and make herself look good to anyone, even though she knows how bad her actions must look from the outside. It's none of their business, according to Margaret.
One of the most interesting aspects of Margaret Hale's character is the way she combines intense pride with compassion for the rest of the world. It might seem like a contradiction at first, but you can see how both parts of her personality come out when she's talking to a businessman like John Thornton about poor people. In an accusing tone, she tells Thornton, "You consider all who are unsuccessful in raising themselves in the world, from whatever cause, as your enemies, then, if I understand you rightly" (1.10.23). She totally rejects Thornton's belief that individuals are one hundred percent responsible for where they end up in life, whether it's rich or poor.
For Margaret there must be such a thing as shared public values. Value isn't determined on an individual basis, or something that can be measured with money. Personal worth is measured by how much you give to the community: you can't be truly good unless you serve the public.
We can see Margaret's belief in this kind of value by the way she constantly shoulders the responsibility of taking care of her family. As the servant Dixon says to her at one point, "Come, Miss Hale—come, my dear! You must not give way, or where shall we all be? There is not another person in the house fit to give direction of any kind, and there is so much to be done" (2.6.3).
The people around Margaret come to depend upon her. But instead of getting annoyed by this dependence, Margaret embraces it and fulfills her familial and social obligations. She doesn't really have a martyr complex… but she does get judgy when other people don't give as much as she does.
Margaret might be a good person, but that doesn't mean she has nothing left to learn. The one great thing missing in her personality is humility. A few years of crushing losses eventually put her on the path to Humbletown, though. After her mother dies, Margaret questions her entire life, and after her dad dies, those questions continue to snowball. Although she was once a woman who never thought she'd have a family of her own, Margaret starts to wonder what kind of life she would have if she didn't think she was too good for everyone:
"Oh, how unhappy this last year has been! I have passed out of childhood into old age. I have had no youth—no womanhood; the hopes of womanhood have closed for me—for I shall never marry; and I anticipate cares and sorrows just as if I were an old woman, and with the same fearful spirit." (2.14.4)
Margaret puts her finger on her troubles when she thinks to herself, "The way of humility […] that is what I have missed!" (2.16.8). It's a shame she only learns this after so many of her loved ones have died, but there's still a lot of good she can do with her newfound humility. Playing with her cousin Edith's son, for example, gives her a taste of what it might feel like to put another person above herself. As the narrator tells us, "[t]hose were Margaret's sweetest moments. They gave her a taste of the feeling that she believed would be denied to her for ever" (2.22.14).
By the end of the book, the most important effect of Margaret's newfound humility is that she's finally able to see the goodness in John Thornton and marry him. Now to be clear, this book celebrates the fact that constant hardship has broken Margaret's ego to the point that she's ready to settle down with a man and have babies. That's not exactly the same kind of happy ending we might celebrate today, but in Elizabeth Gaskell's time, many readers would have read this ending with a pleasant sigh and thought, "Well, it's nice that the proud young lady has finally learned her place." At the same time, Margaret also takes control by being the person who loans money to her new husband. Get it, girl. So for Gaskell, the ending was probably a good compromise between traditional gender roles and feminism.