Yeah, the mysteries and the relationships between the main characters, it probally helps that the concept was novel to the average reader since magic adventures wasn't really in vogue for YA at the time despite similar books being written in the past.
I defy anyone to try and convince me that Goosebumps isn't a more quality book series than Harry Fucking Potter. Goosebumps was the shit when I was a kid and if I am ever cursed to have demonspawn of my own I sure as fuck would be more likely to give them a boxed set of Goosebumps than Harry Potter. Hands down.
Ursula K. LeGuin did the scar-faced magical prodigy attending a wizard school better, in my opinion, with A Wizard of Earthsea.
I see all of these literary recommendations and I raise y'all
Diane Duane's Young Wizards series. In that series, wizards are champions of "The Powers That Be" and given the ability to rewrite the universe using the Speech — essentially reprogramming the universe and, thus, performing wizardry. Wizards can literally be anything (animals, robots, etc.) and can talk to anything. No, seriously,
anything.
Nita and Kit are both more relatable protagonists, both having got into the gig because of being bullied and wanting to make their lives just a bit easier for themselves. Thing is, they discover that their main duty is to travel through time and space to battle the Lone Power, the evil Power who created Entropy and Death, usually involving them heroically sacrificing their lives. (In fact, halfway through the first novel it is explicitly stated that someone
usually has to die this way in order to defeat the Lone Power — although it doesn't have to be a wizard.) Their power, thus, comes with a responsibility that the Potterheads never have. Also unlike the Potterheads, the Young Wizards actually take their jobs seriously, usually because there's high stakes involved (the destruction of the UNIVERSE ITSELF in the first book, the destruction of the entire Eastern U.S. in the second, etc.)
If you wanna talk about YA novels that do this concept more justice than Harry Potter ever could, you start with this series. Fucking fight me on this.