Luna is clearly Hermione’s mirror. I think Hermione’s rationalism, which is such an important part of the trio’s dynamic, has its downside: an unwillingness to leap before looking; a fear of the unknown. We’ve watched Hermione freeze up in just about every book because her studies haven’t provided her with the answer. Usually Ron and Harry have to pull/prod/jolly Hermione past these crises (“Are you a witch or aren’t you!”). Freud and Jung would say that the thing you’re afraid of is the thing you buried, the thing you secretly want to do. But now we have Luna who is Hermione’s physical photo-negative (blonde fluffy hair instead of brown), who is, like Hermione, brainy, if in an entirely different way, and who embodies all of the things Hermione most lacks: intuition and faith. Not big-F Faith, because, thankfully, we haven’t gotten a straight sermon in the books yet, and if we do I’ll scream. But little-f faith in the possibility of the world operating on laws that transcend the limits of mere physics, chemistry and biology. (This is, after all, a universe where magic works.) I think that Luna’s ‘fuzziness’ gets under Hermione’s skin precisely because it is so scary to her. But I think it is part of the support that Harry needs in order to stay sane while facing the horrors of the mysteries that he must face in the years to come. And I betcha knowing Luna forces Hermione to grow too. Besides, how fun, someone else for Hermione to bicker with. And possibly to fight over Ron with. Whooopee!
I’m a rationalist, myself, and love Hermione for her logic and her intellect–and her loyalty. But I think it is wonderful that JKR has inserted Luna, and with her a door to all of those unanswerable mysteries the Department of Mysteries has been struggling with. It allows JKR to touch on issues like death and love and time and responsibility on a larger scale than merely life-within-the-plot without resorting to a religious or even secular creed that would lessen, rather than increase, the books’ impact, since whatever belief she espouses would be at odds with that of 90% or more of her readers.