The pink growth or stain is the result of a mold or a bacterium, specifically, Serratia Marcesecens. The mold is present in the air. Mold and bacteria grow wherever there is a warm, moist, or humid environment, like a tub or showerhead. The mold and bacteria feed on the small quantities of nutrients in the water.
Regular cleaning with bleach or a cleaner that removes mildew will clear the mold. Wipe away standing water to reduce growth. Certain materials, like rubber, plastic gaskets, etc., contain nutrients that help these organisms grow.