Gastric glands in stomach release hydrochloric acid, enzyme pepsin and mucus. The mucus protects the inner lining of the stomach from the action of hydrochloric acid and enzyme pepsin. If mucus is not released, it will lead to erosion of inner lining of stomach, which may cause acidity and ulcer. Ultimately, mucus provides a protection against acids and enzymes in the stomach.