Some caves of the Maya area show evidence of removal of clay and soil, particularly the so-called pilgrimage caves. This practice did not involve large scale removal of earth. Most of the places where these materials were removed were often located in dark and remote parts of the caves, far from sunlight. The small volumes and the dark “virigin” (zuhuy) locations where it was removed make the old hypothesis that the clay was used for making ceramics or “Maya blue” highly unlikely. Maya cave specialists James Brady and Dominique Rissolo suggest that these places were locations where earth was extracted in order to be consumed, or geophagy as it is called. Earth is still being eaten in the form of white clay tablets at Esquipulas in Guatemala. Since caves are associated with both illness and its cure there is a plausible explanation why the clay is given medicinal properties.
Brady, James & Dominique Rissolo. A reappraisal of ancient Maya cave mining.