I’ve read a lot about Hermione’s depiction in the Harry Potter books, and I’d like to shift the focus to the adult female characters and share some thoughts about Rowling's treatment of professional identities and personal ambitions and relationships.
For starters, I think it's clear that motherhood, which is paraded as one of the greatest sources of power in her fictional world, also becomes the sole narrative purpose for several adult women. Lily’s motherhood can be boiled down to a single heroic act; Petunia’s bitterness (and possible fear of having her own son feel less special) led to her over-coddling Dudley and subjecting Harry to abuse; Narcissa is morally corrupt, yet her love for Draco ultimately takes precedence over her family’s allegiance to Voldemort.
The bottom line is: those women put their children first. Even Merope, who gave birth to Voldemort, is pictured as the victim of severe abuse, isolation, and desperation; there's also a troubling throwaway allegation by Dumbledore that Merope had relied on a love potion and basically date-raped Tom Riddle, Sr, but Rowling brushed over this messy background without addressing its serious implications. But the message we got is along the lines of “maternal abandonment is a big no-no.”
The opposite of abandonment would be Molly Weasley’s representation of motherhood as an ongoing practice. In the narrative, she is valuable for feeding, housing, worrying about, and protecting her children - and Harry, who had been deprived of that care. She is shown to be possessive, judgmental, and willing to punish young women whom she perceives as a threat to her boys’ happiness (she turns on Hermione based solely on tabloid gossip!).
Such behaviors might lead some fans of the books to interpret this as character depth: “she is not a one-note mother.” But that layer is still coming from the one note she was given to play; motherhood is all she has. Even her defeat of Bellatrix in the final battle comes across less as a triumphant act by a powerful witch and more as Molly’s ultimate “mama bear” moment. Because Rowling never knew how to deal with a woman who has it all, or wants it all.
Tonks, one of the most promising additions in Order of the Phoenix, becomes narratively defined by her relationship with Remus and her impending motherhood. Fleur, a Triwizard Champion herself, keeps butting heads with Mrs. Weasley over domestic work and then marries Bill and is cooking rare steaks for her new hubby before he leaves for work. The competent women on the Hogwarts staff (and Trelawney) don’t seem to have a personal life. “They may not have been blessed with motherhood, but they are still nurturers.”
McGonagall, who is never afforded the same narrative prestige given to Dumbledore - and who defers to him dutifully - is a beacon of responsibility. And the other female characters with an established career outside of Hogwarts are not framed in the same positive light as those women whose vocation is to protect and care for the children.
Rita Skeeter is the opposite of McGonagall: a case of professional ambition detached from responsibility. She is resourceful, persistent, and skilled at finding stories, but she uses those abilities to feed her own star quality. If we compare her with Lockhart, a male counterpart who displays similar ambition (and is proven to be capable of far crueler acts to manipulate public perception), we see how Lockhart’s vanity turns him into a ridiculous figure (even Hermione is enamored with him) but Rita’s competence makes her vicious.
Umbridge is also the anti-McGonagall; not because of all we learn about her morals, or lack thereof, but because of how her cruelty is disguised under feminine codes (sweetness, pink décor, kittens, etc.). But she also disguises her agency: if she answers to Fudge like McGonagall answers to Dumbledore, then she has been running circles around her boss for ages. At some point, we feel that she was always the one running the Ministry and “making the tough decisions.” It’s like Rowling can’t possibly conceive of an image more nefarious than a woman pursuing bureaucratic power.
In this universe, a grown woman’s integrity seems limited to motherhood or to fields such as healing, teaching, cooking, and serving others. The one time Rowling “tried” to have both led to a minor retcon: Alice Longbottom, described as “the wife of Auror Frank Longbottom,” gets “upgraded” to an Auror herself later, when it became important for the prophecy to have both of Neville's parents defying Voldemort.
So, an earlier book supplies a coherent account in which Frank’s professional identity matters and Alice’s does not; the later book gives them a shared professional identity that invites us to reinterpret that account. That indicates to me that whenever a character wasn’t fully developed yet, Rowling defaulted to giving the father a profession and the nurturing mother a stay-at-home role.
Taken together, these depictions suggest Rowling can't get past a narrow range of possibilities for adult women - motherhood gives them moral importance and service gives them professional respectability, but independent ambition makes them suspect. This goes beyond the structure and conventions of young adult literature and the fantasy genre. This is all on the author's worldview.