
You should recall that different enzymes work best at different pH values. The digestive enzymes are a good example of this.
The stomach produces hydrochloric acid. This helps to begin digestion, and it kills many harmful microorganisms that might have been swallowed along with the food. The enzymes in the stomach work best in acidic conditions - in other words, at a low pH.
After the stomach, food travels to the small intestine. The enzymes in the small intestine work best in alkaline conditions, but the food is acidic after being in the stomach. A substance called bile neutralises the acid to provide the alkaline conditions needed in the small intestine.

Bile and enzyme production in the liver and pancreas