To get into Canterlot University, the most prestigious school in Equestria, one didn't have to be only intelligent. One had to give all that they could to stay on top of the class, or else they'd fall behind, lost on their own confusion about the subject they were studying. One had to love what they were doing, as they were going to spend countless hours studying about their subject, and suffer countless testing on their knowledge. The professors were there, indeed, to to help you, at all times, open heartedly and willingly, but, much is left up to each pony on their own, to show how much could they potentially shine. "Excellence came from the heart and the mind, as they join together, hoof in hoof," was the motto of this university.
And, amidst the student body of this University, Cosmic Star struggled to prove her worth, and uphold her love for the subject of Astronomy. Had the cause of her struggle only been external, the pressure to succeed in this extremely hard University, she'd have handled it better. But, also, she struggled with something else, deeper inside of her. Internally, she confronted herself about the worth of continuing her studies, and walking down the path she felt it was her destiny, or succumbing to her blues of her city, and her family, and leaving the University, to return to familiar faces and places. This internal struggle was already taking its toll on her performance, as she fell behind her class, which, in turn, led her to stay countless hours in the University's library, in her attempts at comprehending the material.
Which is the explanation of why, in that late afternoon, Cosmic Star had, once again, fallen asleep in the Library, not so gracefully faceplanted in a book about Celestial Mechanics, surrounded by her attempts at an organization of her homeworks and classworks.