Sometimes, it seems like the worst mistake a female character can make is being too darn good.
She's not allowed to be weak (goodness, no!), but she's not allowed to be too strong either. She must wear her imperfections on her sleeve, and be criticized for them, or else she risks earning that most dreaded of labels: Mary Sue.
Once upon a time, Mary Sue was a fanfiction term for an original character who was a wish-fulfilment stand-in for the author. Mary Sue transfers to Hogwarts, is sorted in Gryffindor, becomes the new Seeker, is smarter than Hermione, funnier than the twins, braver than Harry and adored by every male character in the school, from Draco to Snape. She has purple eyes and color-changing hair, and nobody can ever fault her, except perhaps for being annoyingly perfect.
Now the term "Mary Sue" is used to describe female characters in mainstream fiction, when the viewer or reader thinks they don't have enough flaws, or that their flaws are not commented upon enough. It's used when a female character appears to be little more than a wish-fulfilment stand-in for (more rarely) the writer or (more commonly) the female viewer. And the comparison to a fanfiction Sue isn't always unjustified. I'd argue that Twilight's Bella Swan fits the description of a classic Mary Sue (albeit an annoying, unlikeable one), because she is little more than a cipher through which the reader can fall in love with Edward Cullen. But once the words "Mary Sue" have been uttered, all productive conversation is shut down. It says that the character is not worth talking about, not worth analyzing, because she's somehow incomplete. Subpar. She's not a character but a projection of female fantasy, and therefore innately, indisputably bad. Any character who falls into this category might be somewhat one-dimensional, lacking the depth and flaws needed for a really compelling character, but the term goes beyond that, throwing on implications of worthlessness (at best) and a kind of superior disgust at girlish dreams and ambitions (at worst). Because "Mary Sue" only refers to female characters.
There is a male version -- Marty Stu -- but it's rarely ever used. A quick google search brought up 45,000,000 hits for Mary Sue and 2,450,000 for Marty Stu. The "male Mary Sue" isn't really a common criticism, because male wish fulfilment characters are considered perfectly acceptable, even desirable, additions to a story. They're the center of many popular franchises. Think James Bond. Indiana Jones. Luke Skywalker and Han Solo. Bruce Wayne. Tony Stark. If any of these characters were female, they'd be torn apart as Mary Sues, because they are far more unrealistic constructions than any female character I've ever seen given that label. They have adventures, save the day, while all the beautiful women fall at their genius billionaire and/or sexy rebel feet. But god forbid a woman have the same fantasy. God forbid a female character be anything but flawed.
And even though I hear the term "Mary Sue" all the time, I don't think I've ever seen or read about a female James Bond, or a female Indiana Jones, or a female Bruce Wayne. At least not in adult fiction. The idea is almost inconceivable, because female characters are already despised and dismissed for far more realistic flaws, like being too well-liked, too successful or too favored by the narrative. So the Doctor in Doctor Who swans around saving the universe and being loved by everyone he meets, but Rose Tyler is a Mary Sue because the Doctor falls in love with her. No medieval knight is called a Marty Stu, but Alanna in Tamora Pierce's Tortall series is dismissed because she fights gender conventions to become one. Harry Potter is the youngest seeker in 100 years, not to mention the Chosen One, but Ginny Weasley is a Sue because she's also talented at Quidditch, has a talent for a particular hex and eventually married her childhood crush. Any time a female character becomes important in the narrative, or loved by an idolized male character, or seems to lack humility and sweetness, someone will disparage her as a Mary Sue. And it creates a painful mixed message about the kind of female characters the world wants to see. They can't be weak and silly and unimportant, but they can't be too strong, too important, too appealing as role models and heroes to female viewers. They must remain in a safe, unthreatening middle ground.