When the Brotherhood of Metallix conquered Mobius by turning it into Planet Metallix, they achieved this by going back in time and removed the egg from Kintobor's fridge, meaning the accident could never happen. In an attempt to ensure the Metallix's did not win, Sonic retrieved the egg from a defeated Metallix and placed the egg in its rightful place. To ensure things happened correctly, Sonic made sure he was the one who turned his old friend into an egg-shaped dicator. In Sonic the Comic Online, it was "revealed" that Cedric the Elephant helped Sonic do this.
An egg like this also appears in Sonic the Human!. Erin's mother appears to have good intentions by feeding her son an egg, but the second one, when cracked open, is notably green and has a distinct aroma oozing from it. In A Day in the Life of Doctor Robotnik, Robotnik is seen eating several eggs created inhumanely from a Battery Hen, but these are not yet rotten.