Rowling spinned a yarn like possibly no other writer we've ever seen, but from having read all those books I can tell you it was all done on the fly. Stuff like "jews went to Hogwarts" and "Dumbledore is gay" was all off the cuff, and she sticks with it, that's what's she's good at. Her entire story is off the cuff. She didn't spend weeks agonizing over secret backstory and plots the reader would never read or be made aware of, she didn't develop entire languages and cultures spanning hundreds of years for her eyes only. She's not Tolkien or Martin in this regard.
For example, in a world of magic, why are you using one of the slowest flying nocturnal birds to deliver messages? I know this is a meme, but this kind of inconsistency is indicative of her entire world. Things are written because they are fantastical and capture the imagination.
She's might be the greatest literary bullshit artist the world has ever seen and her story hooked an entire generation of children and generations of children to come, but the world it takes place in is shallow as fuck. I think there's a lot of artistry in that, considering all of the careful planning other writers have had to commit to in order to have the same lasting cultural impact.
Wizards use owls in Harry Potter because owls are historically depicted as otherworldly creatures/birds of ill-omen/in league with witches in European folklore, and you basically never see them in the daytime. I think it's implied in the books they're sort of magical, because they know where to deliver the letters based on whatever's written on the envelope.
While her worldbuilding was shallow, it was designed to appeal to children. Wizards use owls and wave wands to cast magic spells and wear robes because that makes sense to a child, based on folklore they encountered. It's a similar reason Harry goes to a boarding school and rides a steam train and has massive yummo feasts and gets to go on day trips to the village to enjoy the sweet shop and whizzo joke shop. The average child reading Harry Potter in the 1990s would not be in boarding school, or riding on steam trains, or visiting sweet shops where the sweets all come in jars and you can get a pennysworth in a little paper bag. But they'd have known those stories from works of classic English children's literature, like Tom Brown's Schooldays, The Chronicles of Narnia, Five Children and It, The Famous Five (etc etc). His Dark Materials took a similar approach, although mostly to skewer that literature.
I think the pinnacle of that is Quidditch. Quidditch makes no sense. The whole point of the game is to get the sparkly golden ball, and the rest of it is largely pointless. JK Rowling said of it herself -
Quidditch was invented in a small hotel in Manchester after a row with my then boyfriend. I had been pondering the things that hold a society together, cause it to congregate and signify its particular character and knew I needed a sport. It infuriates men, in my experience (why is the Snitch so valuable etc), which is quite satisfying given my state of mind when I invented it.
I think it speaks a lot to how a child reacts to learning of some of the more obscure sports played by the posh - things like fives, bumps races, the Eton wall game, hard rackets - and to a lesser extent, cricket, rugby and polo (which tend to be the preserve of posher schools, but are obviously far more common). The rules seem confusing, it doesn't seem to make a lot of sense, it involves expensive specialist equipment, it's really weirdly violent at times... but there's also some sort of great tradition of playing it at fancy boarding schools, and helpfully the protagonist ends up being amazing at it and saving the day.
I think those books get put under the microscope because of the initial modern setting specifically to appeal to a modern child. So the fantastical element of it gets overlooked. But that and the fact its initial audience grew up alongside the books meant it's subjected to all sorts of scrutiny other similar works are not. I don't think I've ever seen someone seriously argue "but why does the giant peach James live in not simply
rot? I don't understand how something of that density was able to float in the sea, let alone get lifted by 500 seagulls on strings. Plus the magic crystals just make things big, there's no in universe explanation why it made those insects gain the ability to talk. And the entire foundation of the story - James's mother and father got eaten up by an enormous angry rhinoceros which had escaped from London Zoo - took me completely out, everyone knows rhinoceroses are herbivores, and there's no way it could have eaten them so fast in the middle of Central London, one of them could have gotten away...."