This is not something I came up with, but I found the idea to be interesting. Just as a forewarning, this theory refers to various episodes that I have not reviewed yet, so now is a great time to binge watch, if you haven’t seen them all yet. And yes, I know we were told in the first episode that Spike started out as a purple and green egg, but it appears his egg was varying shades of purple instead.
Spike is from a race of dragons that were building an alliance with Celestia. Most of the other dragons we’ve seen in the show have been less than friendly; the ponies themselves fear the migration. It is possible that a dragon or two could have even swooped down for a meal at some point.
Celestia, however, encountered a race of wingless dragons that were being harassed by their meaner, winged cousins. Sensing the magic contained within them, Celestia started negotiations with Spike’s father and/or mother. The winged dragons got wind of this and attacked. For the sake of the alliance and to protect the ponies, Spike’s parents and clan fled.
Spike’s parents left Spike’s egg with Celestia, because although they feared for their own lives, they believed the princess could protect the egg. The winged dragons wiped out their more peaceful relatives, and Spike’s parents were never able to come back for the egg.
Celestia, sensing the greatness within Twilight, allowed Spike to be raised and stay with her, as both would benefit from the relationship. This is why Spike is able to magically send and receive messages to Celestia. He could be destined to be an ambassador between the ponies and dragons. Perhaps his parents noticed something special about the egg and knew that Spike belonged with the ponies.