At this point, it is very well known that Harry Potter (for the purpose of this thread I'll only be discussing the seven books) is an allegory for liberalism. Specifically, British liberalism. It is a fantasy of what Rowling and her readers believe post-historical British liberalism is like. Fundamentally, it's about how everything is fine.
One element where the specifically British perspective reveals itself, is in the way Rowling portrays the educational system. Hogwarts is a private boarding school.
In the Harry Potter novels, every character who remotely matters is white. Race is one of the novels' central concern, but it is only present allegorically.
People have already criticised the pitfalls of this allegorical system. Notably, Remus Lupin's lycanthropy is an allegory for AIDS, and people have noted that Rowling could very well have literally given him AIDS. Allegory, even though it is often unnecessary and inconsistent, is what Rowling uses to portray people whose struggles would disturb her white British middle class audience if they were directly referred to, such as PWAs and black people.
Just as PWAs only exist metaphorically, so do black people. Hermione is the most prominent black character in the novels, but she is allegorically black: Muggle-born. Muggles are an allegory for POCs and working-class people. Hermione is an anomaly at Hogwarts: she's the working-class black girl who got in on a scholarship.
Hermione is the only black working-class girl in her year in Hogwarts and she is also (what a coincidence!) the hardest-working, the kindest, the most well behaved. She is the isolated working-class POC who is granted a shot at social mobility through merit, she is absolutely central to the liberal fantasy of a meritocratic State. A tiny rules over everyone else, but one or two people in this minority are POCs, so it's not actually a problem.
Hermione has to justify her place among this ruling class by working twice as hard as everybody else, and my adhering strictly to the rules on every occasion, even though the white (wizard-blooded) characters around her constantly act as if the rules don't apply to them.
Hermione is "one of the good ones"
And, as far as a portrayal of the ruling classes of Britain goes, it's accurate. If you go into a British private boarding school, you will find that the one or two working-class black kids there have to work twice as hard as their classmates, and be twice as well-behaved. In Rowling's eyes, this is the way things ought to be.
Hermione is so widely celebrated because in the eyes of white British liberals, she is the proof that The System Works.
@realmaxkeeble @garfiald
So wizards are the Jews?
@realmaxkeeble @garfiald No, because I don't his believes. I'm just doing the devil's advocate.
@matrix @garfiald hey look itâs anime Oswald Mosley