Actually, I think Scorpan nicked the egg back when he and Tirek went to Equestria to steal magic, but then felt bad about it [among other things] and gave the egg to Starswirl, and later it ended up in Celestia's possession after Starswirl went missing, probably looking for Clover the Clever