In Boast Busters, Twi said that most unicorns only have a few spells that relate to their special talents. All unicorns seem to have levitation and simple things like that, but other than that, they don't know much else. Take Rarity, for example; we've only really seen her use two spells, the gem finder and the illusions.
Also, in Boast Buster, Spike talked about how impressive and odd it was that Twi could use so many different spells, and she said that the reason she could use so many spells was probably because her talent is magic itself.
The show isn't really known for consistency. My point is, why would Star Swirl write his spells down on scrolls and books if nobody could learn them other than Twilight?
I think every unicorn has some kind of default spell they're born with related to their talent. In this case, Rarity was born with her gem find spell so she is the spell's inventor while Twilight is the inventor of the teleport spell (at least we haven't seen any unicorns use this spell yet).
The way I see it, as a unicorn's talent grows and requires more demanding tasks completed, they begin to study spells related to their skill. I think Rarity studied illusion and transformation spells (Look Before you Sleep) for the sake of beautification because that is her talent. Even though Rarity could learn say, an invisibility spell, she wouldn't have any use for it and the time and effort that went into learning the spell would just be a waste of time.
Think of Twi as a mixed martial artist while Rarity is purely dedicated to one fighting style.
Edited by hironakamura, 12 May 2012 - 06:15 PM.