Sharing a fantastic article from Better Homes and Garden. because it is just so good.
Just before laying an egg, the hen adds a protective layer called “bloom” or cuticle to the outside of the egg. This coating seals the shell pores, prevents bacteria from getting inside the shell, and reduces moisture loss from the egg. These are all things designed to make the egg last longer.
All chickens add the protective bloom to an egg just before they lay it. However, because of the conditions at some large egg operations in the United States, commercial (grocery store) eggs are required to be washed right after collection. This is done to make them appear clean and presentable. Of course, this destroys the protective egg bloom. Then, to try replacing the natural bloom, most commercial packers spray shells with a thin film of mineral oil. That’s why grocery store eggs sometimes appear shiny.
An advantage of having backyard chickens is that we can assure sanitary conditions; so the natural protective bloom can be preserved. If the nest boxes are kept clean, most eggs come out spotless, so washing after collection is unnecessary (read more on washing eggs or not here).
Eggs that have their protective bloom will last for months, but washing them right before cooking is a good idea.
Occasionally, an egg will come out a little dirty, or feathers and nest box shavings will stick to the fresh (still wet) bloom. If shavings or feathers have gotten stuck, we simply brush them off.
Any eggs that are truly dirty we wash and reserve for immediate use. The bloom should NEVER be washed off any eggs that are planned to be used for incubation and hatching; these eggs need all of their natural protection (see Collecting and Storing Eggs for Hatching).