Originally, they could only create stable time loops. The spell could only be used once. It only went back a week.
Oh look! All of these features were apparently safety measures that Starlight Glimmer was able to edit out! Just like in my fanfic (although there it was Twilight).
I think a lot of people watched this pair of episodes and thought 'this is just like in my fanfic!'
So, right. Now time travel lets you go back in time and change the past, but you and the 'time machine' (here, the cutie mark map and the scroll) are immune to any side effects.
...except that when you change the past, the changes aren't 'real'. Zecora's true-sight potion was able to identify Twilight and Spike as being 'real' while the rest of them weren't.
"Without us, Equestria is doomed!" Actually, it looks like Equestria was only about 20% more doomed. But since they've faced more than five world-destroying villains, this was enough to have every attempt to rewrite things without Twilight's friends end up with somepony evil taking over. Somepony different every time.
Attempt 1: Rainboom is stopped by grabbing Rainbow Dash and physically restraining her. Result: Sombra is somehow a credible threat. Maybe Cadance wasn't rescued from the changelings in time? Instead, she starved to death in the caverns and by the time the ponies finally repelled Chrysalis, Sombra had already started his invasion...
Attempt 2: Starlight convinces the bullies and Fluttershy to embrace equality, so no race ever happens. Result: Chrysalis is still at large and Zecora leads a rebellion. Clearly, with Fluttershy as the spokespony, Equalism gained an early hoofhold and as a result of everypony being forced to act identically, the changelings were easily able to infiltrate. Yeah, that's what must have happened.
Attempt 3: Twilight and Starlight fight, Rainbow Dash is distracted watching. Result: Nightmare Moon rules. Rainbow Dash must have acquired a love for magical spectacle and rushed to be her evil minion, making the difference between winning and losing in her fight with Celestia.
The fan theory is that the utter wasteland in the last attempt was Fallout: Equestria, with the coal shortage and forced industrialization being caused by the eventually victorious war against Sombra. That kind of makes sense since it was after another generic 'just stop the Rainboom' attempt.
There isn't enough detail to really make sense of the Discord, Tirek, and Flim Flam bad endings. Oh well.
So... why was Equestria doomed? The easy answer is that Twilight Sparkle and her friends are really just that special. This is Twilight's explanation: "I don't know why, but it's empirically true!"
Her other theory is that friendship is important enough that unravelling *any* friendship would have unraveled Equestria's harmony just enough to make things disastrous. "Look what happened when you lost your own friendship, Starlight -- you became a supervillain!"
Maybe it's kind of both? Any friendship that had been chosen by the Tree of Harmony to be the lynch-pin of Equestria's defense against the millennial wave of evil would have been just as important, but as it turns out the Tree chose them. It had already set up the Rainboom -- it was invested. If Starlight wanted a non-doomed Equestria with Twilight friendless, she should have gone back further and messed things up for them individually so that other ponies were chosen instead.
Then again, linked cutie marks are called out in the very beginning as being important and magical, so it might just be that. Or that might be the same thing as the previous paragraph. Either way, the Crusaders are likely to have an important destiny. I just want to know why the heart+apple was on Scootaloo's side of the Venn Diagram -- it would have made more sense for star+heart = Sweetie, heart+lightning = Applebloom, and star+lightning = Scootaloo in my opinion. But Twilight's the one who drew up the diagram and presumably did the math. q:3
A final thing that other people noticed -- the timeline wasn't put back exactly like it was. Originally, Pinkie Pie was about to walk in with a cake. After they 'fixed' things, all five of Twilight's friends came in together, with no cake. Dun dun DUUUUUN!
I'll give it 3/3 even if the ending wasn't exactly what I would have wanted. The solution was logical in broad stokes, and it was only some of the details that fell flat. Meanwhile, the rest of the episode was an excuse to wow us with stuff, and it did.