Although many animals and humans eat soils (clays, etc), we have to be aware that the ones we use to pot flowers may/do contain things that wouldn't be wise to allow our animals to ingest.
Clay ingestion...
http://www.ajcn.org/cgi/content/abstract/53/2/448
"The African clays released calcium, copper, iron, magnesium, manganese, or zinc in amounts of nutritional significance from some clays but not from others."
http://abcnews.go.com/Health/story?id=1167623&page=1
"Clay's ability to absorb plant toxins is well documented."
Elephants...use of licks to get sodium...
http://apt.allenpress.com/aptonline...&issn=0022-2372&volume=083&issue=03&page=0652
The benefits of clay...
http://72.14.203.104/search?q=cache...ophagy.doc+geophagy&hl=en&gl=ca&ct=clnk&cd=72
Hookworms...
http://www.appliedozone.com/parasites.html
"Symptoms from hookworm are Iron deficiency, abdominal pain, loss of appetite, craving to eat soil".
Parrots...
http://www.duke.edu/~djb4/Real dirt on clay licks.htm
"There have been two main theories floating around about why parrots eat soil. The first says that the birds eat the soil to get minerals. Something like an avian daily vitamin pill. The other major theory is that they eat the soil to protect them from toxins in their diet".
"So this textural cue may lead the parrots to the soil that simultaneously neutralizes the nasty toxic chemicals they eat and provides them with an important source of sodium."
There is no reason why geophagy (dirt/soil/clay eating) should have a single purpose...it may serve different functions at different times. It may occur to satisfy a need for a missing nutrient or to help with detoxification or digestion...or maybe serve another purpose that hasn't been figured out yet.
Primates and other animals also eat plants to rid themselves of parasites, internal upsets, etc. which may be part of the reason it has been reported that some chameleons chew on branches and eat leaves, etc.