Oysters make pearls as a natural defense mechanism to protect themselves from irritants such as parasites, food particles, or other foreign substances that enter their shell and irritate their soft body. When this happens, the oyster secretes layers of nacre (a combination of aragonite and conchiolin) around the irritant to coat it. This process gradually forms a pearl over time. The nacre is the same substance that makes up the oyster's shell, and coating the irritant helps prevent damage and soothe the oyster's tissues.