Purple dye originally came from the mucus glands of a snail. The discovery of the dye is often attributed to the mythological Greek God; Heracles, or rather his dog, who was eating snails off the coast of the Levant and returned with a mouth stained a deep purple colour. From a biological point of view the snails use the purple mucus as a defence mechanism to spray predators and make their escape, they also use it to catch their own prey and protect their eggs.
The colour purple was incredibly rare at the time, it is unlikely that those who discovered the snails had ever seen another purple plant, animal or living thing, as such the colour was vastly sought after. However it was a very slow and costly process to create dye from the mucus produced from the snail, it required over 12,000 of the shellfish to extract just 1.5 grams of the dye, enough to colour a handkerchief. Purple quickly became incredibly valuable and even worth more than gold, by 300 BC a pound of purple dye was worth 3 times a bakers annual wage.