A pearl’s shape is due to the pearl’s formation process beginning with a single 1.0mm square piece of mantle tissue or a perfectly round mother-of-pearl bead nucleus inserted into the mollusc. Upon insertion, a pearl sac is formed around the irritant and the mollusk begins secreting concentric layers of crystalline nacre around the nuclei, eventually forming a pearl.
Essentially the bead nucleus is supposed to act as a perfectly round template for the oyster to lay nacre around, increasing the chances of harvesting a spherical pearl.
The amazing variety of shapes that occur with each harvest are due to subtle disruptions in the layering process inside the mollusk. This can be as something as tiny as an air bubble, to more invasive issues like parasites or bits of organic material that the animal has filtered into its interior body interrupting the delicate process, eventually resulting in the wonderful array of Off-Round, Drop-Shape and Baroque pearls.