Ok, so basically I headcanon that Celestia had Sunset with the captain of the guard before Shining Armour, who just happened to be an earth pony which is why nobody knows about it, because nobles and racism. So Sunset was sent to an orphanage after she was born and brought back later.

Now fast forward a few years and she finds out how is irrelevant but she's naturally hurt and confused. Now this next bit is a personal favourite of mine, Sunset has been going on little adventures her entire time as Celestias student and they've only gotten more involved and dangerous as she grew older, since she was basically doing Lunas job on a smaller scale.

Her most recent adventure revealed her parentage and that a group of nobles where doing shifty noble things that would seriously damage Equestria. Long story short the end result is that Sunset got hit with some dark spell that had a similar effect to Lunas nightmare got caught in the restricted section trying to find a cure, and was banished due to the leader of the shifty nobles claiming she was planing a cou'deta.

Celestia believed them because she had already lost one member of her family to this type of thing, but only planned to hide Sunset away so she could try and help her. Sunset misunderstood pulled a runner and ended up in the human world. Celestia didn't follow because she has a country to run, and her insane sister was due back in a few years.