Hydrochloric acid is the primary digestive acid and has several roles in digestion. The acid prevents harmful bacteria from entering your system by sterilizing it. Another function of hydrochloric acid is to trigger the release of pepsin. You need hydrochloric acid to absorb minerals like magnesium, sodium and iron. Gastric acid is so strong that it could digest the stomach if not for a mucus lining protecting the organ.