This is my random theory



Celestia decides to reform Nightmare Moon (Who is a separate pony from Luna), and she decided to choose Pinkie to reform her.



Which, in hindsight, wasn't a good idea.



But, in the end, Moonie warms up to Pinkie. And they become friends.



Maybe a little more. Maybe.