To sell toys

From Equestripedia, the Archives of Equestria!
And yes, this got a toy

To enjoy the My Little Pony stories, it is important to remember that they exist to sell toys and other merchandise. Hasbro is primarily a toy company, so of course they're most interested in selling toys and other products to fans of the show. Though it's sometimes easy to forget, since My Little Pony doesn't tend to be as blatant about as G.I. Joe or Transformers but the cartoons, films and to a lesser extent, comics exists mainly to market toys of various characters to the audience.

Since My Little Pony tends to be a lighter series than G.I. Joe or Transformers (with some exceptions), the series is often "distorted" in different manners in order to produce new toys. While Transformers is infamous for killing off characters for the sake of replacing them with new toys, My Little Pony has often taken a different approach and often either just changing the characters outfit (even for just one scene), giving them a new form or introducing suspiciously similar substitutes.

The most infamous case of this is easily the Coronation of Twilight Sparkle, transforming Twilight Sparkle from a unicorn to an alicorn. While newer fans may not bat much of an eye at this, it's almost impossible to understate how much of a big deal this was when it happened, and how many fans hated the decision as they felt it was purely there for marketing reasons.

Casting

Huge casts

One of the most beloved features of the 4th generation of My Little Pony media is how large the expanded cast of characters is, and how often they appear. Friendship is Magic and arguably to an even greater extent, Equestria Girls are both packed with consistently appearing characters with their own relationships, personalities and skills. While Equestria Girls toys tend to focus on the primary figures and occasionally the villains, Friendship is Magic toys on the other hand have plenty of toys based off side or background characters.

Rotating casts

One of the more peculiar characteristics of the Generation 1 cartoon was a massive cast of rotating characters. Virtually every story featured a different combination of characters from a large pool, even if their established personalities and skill-sets didn't complement the adventure at hand. It wasn't uncommon for episodes to feature characters who were apart of the adventure, but didn't do much at all. One can easily piece together this was a tactic in order to show off a new toy to a potential new audience. Interestingly, all though most of these episodes had one-off characters (Duchess, Garth, Prince Edgar, etc), it seems like very little, if any, of them had toys of their own.

Comics

Comics are an interesting note in this. Other than My Little Pony (Gameloft), a mobile game that has, unexpectedly, began to adapt comic storylines in order to sell digital versions of new ponies, comics don't really tend to factor in the "to sell toys" philosophy. This is likely due to the fact that, although comics have been apart of the brand since the 80s, due to their more limited release and other factors, they never quite became as synonymous with the brand. Because of this, comics themselves have essentially become merchandise to sell, rather than a vehicle for selling merchandise.

There may be exceptions to this rule, however, as early IDW MLP comics featured toy characters who never appeared in fiction before, such as Tealove and Sweetcream Scoops, however it is unclear if these were simply nods and references to those characters, or if they were there to advertise toys.