The shell is the egg's first line of defense against bacterial contamination. If the diet is deficient in calcium, for instance, the hen will produce a thin or soft-shelled egg or possibly an egg with no shell at all. Occasionally an egg may be prematurely expelled from the uterus due to injury or excitement. In this case, the shell has not had time to be completely formed.
Shell thickness is also related to egg size which, in turn, is related to the hen's age.
As the hen ages, egg size increases. Seven to 17 thousand tiny pores are distributed over the shell surface, a greater number at the large end. As the egg ages, these tiny holes permit moisture and carbon dioxide to move out and air to move in to form the air cell. The shell is covered with a protective coating called the cuticle or bloom. By blocking the pores, the cuticle helps to preserve freshness and prevent microbial contamination of the contents.