The primary reason the body becomes unable to produce enough stomach acid is from nutritional deficiencies. Stomach acid is actually formed from the chloride component of plain old salt. It binds with hydrogen to form HCl. The sodium is used to form sodium bicarbonate. Stomach acid formation also requires zinc and some B vitamins, B6 and B12. Part of the problem though is that these same nutrients also require sufficient stomach acid to be absorbed. If the stomach becomes too alkaline from lack of nutrition, antacids, acid blockers, Alkaline Waters or other alkaline drinks the absorption of the nutrients required to form the stomach acid is impeded further reducing stomach acidity.
Methylation is also required for the production of stomach acid, which is why I also recommended the TMG to jump start the stomach acid formation.