It would make sense if the pony race segregation had started with the oppression of the Earth ponies since they were probably seen as "less than" for not having any magic (at least until later on in the series) like the unicorns or pegasi. They probably wanted to see themselves as more than farmers or as the "plain" ponies but they couldn't convince the unicorns and pegasi otherwise.
I imagine this all played out similarly to the events that lead up to Hearth's Warming in G4. Everypony became hateful and jealous until it became too much to handle. I guess it was worse than what happened during Hearth's Warming, though, if the only thing ponies could agree on was sealing magic away. This is like a "Starlight Glimmer" approach to things: stripping away anything that made ponies different from one another so they wouldn't fight anymore.
Only thing I don't understand is why ponies still hated each other even after the magic was taken away! They should be happy with each other now that they're all "equal", right? I guess there was still enough prejudice in everypony (except ponies like Sunny) that it didn't matter. Ponies were still pointing hooves at each other, most likely blaming one another for being responsible for the disappearance of magic. It also didn't help that Canterlogic made profits off of prejudiced devices.
I have to wonder if the divide was similar to what Cozy, Tirek, and Chrysalis attempted. They were pretty successful in turning pony races against each other until the Mane 6 were able to stop that. It makes me think that pony racial tensions were always a thing, they just get more ugly and tense if a powerful figure like a supervillain feeds them.