There is actually a lot of science in cooking eggs.
Eggs are a great example of nature's packaging.
If you squeeze the ends of an egg between the palms of both hands, it won't break. This is why eggs are stored and sold with their ends pointing up or down, and not lying on their middles. One feature of the egg is an air sac at one end, which serves as a shock absorber to keep the developing chick from being disturbed by the outside vibrations. When you put an egg into boiling water, the air sac expands. If the sac expands only a little, the yolk and white will be pushed into the rest of the shell, and the result will be a hard-boiled egg with a flattened end.