Many moons and suns ago, there lived a ruler of ponies. She had been through many hardships, done many things to defend her kingdom, and things were prosperous. Now and then, she saw flickers of evil and corruption among her subjects, but that was normal. So she thought.
One day, her sister attacked her. Her sister had been tainted by emotions and urges, twisted herself into a monster. She sealed her sister away, hoping to find a cure.
The guilt ate away at her. It tainted her soul. She devoted all her thoughts to solving this problem, to fixing her mistakes.
If her own sister had been overcome by such evil urges, then what would become of her kingdom and subjects? Would they succumb to evil and corruption?
Finally, after secluding herself for so long, she had an idea. She would make a mirror. A mirror that reflected all the good in whomever looked inside it, and suppressed and blurred the bad. She would have all her subjects come to look inside it, and surely that would prevent any more hatred and malice. And when her sister finally returned from her exile, then they could look into the mirror together, and everything would return to normal.
She forged the mirror from silver and gold and dragonfire. It worked perfectly. She summoned every pony in the kingdom, decreed they had to look into it. And every pony did.
Except one. The last pony in line approached the mirror, and the ruler bade him look into it. Instead, he struck it, and it shattered into uncountable pieces.
Before the ruler could react, the pieces of the mirror scattered. Fragments embedded themselves in every pony in the kingdom. The largest pieces struck the ruler herself, burying deep inside her heart and eye.
The pony never explained himself. The ruler forgave him. After all, she saw the good in his decision. With the pieces stuck in them, the effects would never wear off. Every pony would see the good in each other forever. Eventually, the effects of the mirror became irreversible. The kingdom prospered like never before.
Many moons and suns passed, and her sister's exile weakened. The ruler waited with bated breath. After so long, she would be able to see her sister again. To cleanse her and repair her. She had even made another mirror, for her sister to look into when she returned.
Finally, the magic sealing the sister faded, and she returned to the kingdom. She would be still corrupted, still twisted, but the ruler had the mirror ready.
The ruler looked at her sister, and saw only the good in her. It was like her sister had never been tarnished. The ruler was so elated, she forgot that the sister was still full of hatred, and the sister attacked her.
The ruler didn't fight back. The sister killed her, and became the new ruler. But when the new ruler found the mirror, she was filled with guilt. She looked inside it and saw all the good qualities she had lost.
She took the pieces of the mirror from her dead sister, embedded them inside herself. She swore that no matter what, she would not let this continue. She would never let herself be overcome by evil emotions or urges ever again.
To celebrate this transformation, this redemption, this revelation, she took a new name: Celestia.