Starswirl the Bearded was renowned for many of his spells that unicorns use today. That being said, even a great unicorn like him had plenty of unfinished work, the spell which Celestia passed to Twilight is one of those.
Unknown to Equestria as a whole, their entire lives would soon be changing for better or worse when an entire space fleet appears in response to Twilight's magic spell.