Quick side note: does anyone else feel like our relationship with Moody in books 5, 6, and 7 is sort of fake? He’s this member of the Order and he’s looking out for Harry so we’re supposed to feel something for him – but the “Moody” we actually got to know in book 4 wasn’t actually Moody at all! It’s a small point but I feel like JKR kind of glosses over this and expects us to care for Moody as if he were actually the character we spent so much time with in book 4.
Now more meaty discussion (with minor spoilers): I think the two-way mirror is a really interesting authorial choice by JKR. Yes, she needed Harry to get it as it will play a role later but there are a million different ways Harry could have come by the mirror. The specific way she chose resulted in Harry being guilt-stricken about having forgotten it and, hence, being manipulated and, hence, going down a path that ultimately lead to Sirius’s death. That’s dark stuff! She deliberately chose to inject crushing guilt and remorse that is not necessary to advance the plot into our hero’s characterization.
I think this is where JKR really succeeded. She had a runaway hit with the first book. She could have kept the tone of the first book, rattled off several more volumes, and no one would have complained. Instead she chose to ratchet up the maturity and darkness and it just adds so much more depth to the characters.
Not only that; it also makes our hero’s journey over the course of the series that much more resonant. Most humans have been through an arc in their own lives in which things started out happy, innocent, and whimsical but then became more serious and heavy as they got older. That’s what JKR has captured so deftly in her progression of the HP series and I think her choice to make the mirror more than just a convenient deus ex machina is emblematic of it.