Stomach mucus protects the gastrointestinal cells from the damage that gastric juices can cause. Gastric juices are highly acidic and, without this mucus, the acid can destroy the cells and tissues in the stomach.
Mucus in the stomach is rich in bicarbonate, an alkaline compound, to help lubricate and protect the stomach. Stomach acid comes from the parietal cells, a type of stomach cell, and it is a hydrochloric acid, which is a solution of water and hydrogen chloride. This allows the environment in the stomach to be highly acidic. A high level of acidity is critical to inactivate bacteria in the food that people eat and to activate pepsinogen, a type of enzyme.