An analysis of data on stomach acidity and diet in birds and mammals suggests that high levels of stomach acidity developed not to help animals break down food, but to defend animals against food poisoning. The work raises interesting questions about the evolution of stomach acidity in humans, and how modern life may be affecting both our stomach acidity and the microbial communities that live in our guts.
See the article here:
The evolutionary link between diet and stomach acidity