Process optimization aside, any sufficiently hungry person who would mash a snail they scraped off a rock could discover it. When exposed to air the clear liquid in the gland reacts with an enzyme also in the gland and turns purple. I haven't seen anyone mention flavor, but it is possible the dye gland is an icky part.
You can find YouTube videos of people dying cloth by just walking around, mashing snails and dribbling their juices on skeins of fibers they have wrapped around their arms.
You can find YouTube videos of people dying cloth by just walking around, mashing snails and dribbling their juices on skeins of fibers they have wrapped around their arms.