Hi Jeremy,
I'm only recently back on the boards here so others may have more current info for you.. With that disclaimer, I'll note that its more common than not for chameleons to eat dirt on occassion, and noone seems to have answered the "why?" definitively. Intuitively we might suspect there are micronutrients and/or minerals in soil that are important, nutrients that a free ranging chameleon striking free ranging insects would likely get. Last year, faced with the same ??, I learned a little bit about humic acid, which results from decaying matter and gives soil its brown color and has a major effect on how molecules move around living systems. I got a bag of organic composted leaves from the garden center and put about a tablespoon in a small jar lid on the bottom of each of my three chams' cages. It wasn't ten minutes before one of them was on the cage floor eating big mouthfuls of it -- just like a ravenous dog -- and the second was striking big gobs of it from the lowest available perch. The third seemed entirely disinterested. Not sure what to conclude from that but now they all get a helping of leaf compost 2x per month (I sift out any debris -- tiny twigs, etc. -- that pose any risk of impaction). Personally, I'd love to see soil analyses from the various cham species' home ranges -- it is high/low in specific trace minerals? Maybe some of the folks who collect the WCs or lead the trips to places like Madagascar (e.g., Bob Love) could fetch some soil samples back with them some time. Meawhile, if you're topsoil is free of debris, chemical fertilizers, etc., then I wouldn't worry.