During its growth and development, a honey bee larva increases its weight approximately 1700 times. This amazing increase in body mass occurs in a period of just six days and is fueled by food prepared and delivered by the worker bees. The food—first royal jelly then a combination of pollen and nectar—is pooled in the bottom of the cell where it surrounds the larva.
In order to keep its food supply free of contamination, the larva retains its feces during the entire six days of development. Then, when it has reached full size, it defecates just once right before it spins a cocoon. Since the cocooned pupa doesn’t eat, defecation is no longer a problem.
The larvae manage to retain their feces because the large midgut where the feces accumulates is not attached to the hindgut from where it will be expelled. In short, there is no place for the feces to go. Then, just after larval feeding is complete but before the cocoon is spun, the midgut and hindgut unite into one long, continuous tube. At that point, the larva defecates in the form of dry pellets.
The feces deposit is mostly removed from the cells after the adult bee has emerged. Nurse bees—usually newborns—clean and polish all the brood cells between uses, removing any loose debris. However, some feces may remain embedded within the sticky cocoon material that remains attached to the cell wall. Pressed into the fabric of the cocoon, this material becomes relatively inert and does not contaminate the next generation of honey bee larvae.
When a beekeeper melts brood comb to collect beeswax, he must separate this sticky leftover stuff called slumgum from the rest of the wax. The slumgum includes the fragments of cocoon and feces the bees couldn’t remove, along with pollen, bee parts, and dirt.
Although the mechanisms vary, all bee species have some type of system to keep feces and food supply separate during the larval stage of development.