The common chicken egg - a delicacy to humans - will eventually rot over time like any foodstuff. A rotten egg was discovered in the refridgerator of Doctor Ovi Kintobor, which the doctor removed and then tripped over a cable in his lab. The egg he held in his hand collided with the controls of the ROCC, causing the machine to malfunction and release all the negative Chaos energy it had stored. The evil energy combined with the egg and Kintobor, transforming the once kind, skinny scientist into the obese and malicious Ivo Robotnik.
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.