The Harry Potter movies were popular because they were based on an insanely popular series of books. Same with Lord of the Rings. I don't know if there is anything else similar that's at the same level of popularity. Game of Thrones, of course, but that was turned into a television series.
There is plenty of "young adult" fiction related to magic, some of it much better than Harry Potter, but I can't think of any that are as well-known.
Fantasy movies are expensive to produce, I think, so there is probably hesitation to shoot anything that isn't a sure-fire hit.








