This was several years ago, before Twilight Sparkle got her wings. I concocted a scenario in which Princess Luna, recently returned from exile, wanted to review all the star charts and astronomy records that had been made in her absence. Who better to help her than Twilight? It would be the perfect friendship-building endeavor.
p.s. I originally posted this under an alternate name on a different site