Contrary to the custom of the Hebrews and other Orientals, the Egyptians shaved closely, only allowing the beard to grow as a sign of mourning; thus reversing the custom of the Hebrews, who shaved as a token of mourning.
See note on Isaiah 15:22He is gone up to Bajith, and to Dibon, the high places, to weep: Moab shall howl over Nebo, and over Medeba: on all their heads shall be baldness, and every beard cut off. (Isaiah 15:2) (#494). Strange to say, the Egyptians, while so careful to shave the beard, sometime fastened false beards to the chin. These were made of plaited, hair, and were different shape and sizes, according to the rank the wearer.
Joseph, while in prison, allowed his beard to grow; now that he is released be shaves, according to the Egyptian custom, as it would have been a disgrace for him to appear with a beard in the presence of the king.