It was caused by Rainbow dash.
one day, there was a great worm called "Wormzer". he hated female ponies with all his heart and soul, and with they were all dead.
But He killed his best friend after a big fight, and for his murder, he hafd to be punished. They had no cuffs (Even if they did, he's a F***ing worm, it wouldn't work) so they sent him right into the world of ponies to suffer from his hideous murder.
Meanwhile, there were 2 cmplete moron ponies, that really got Rainbow dash mad, so she made the worst munishment for them ever: The sonicrainboom.
She killed 95% of male pony populations, only meaning to kill those 2 ponies, but she thought it was fine...but, there was some disagreement.
This helped 6 people, 5 ponies and Spike. this got Wormzer mad, and he wanted his great revenge.
Since he was mad (And hungry), he did what he could do best. he did one thing to make him happy: He made a massacre to the female ponies, and devoured 99.99% of female pony population. This dropped total pony population to 15 ponies.
This helped 5 people, a Pink puffball called "Kirby", a tall purple guy called "Waluigi", a corrupted crab called "Moar krabs" and a princess called "Zelda" (At least she's a girl). they joined forces with wormzer as great allies, and they declared war over the Rainbow dash.