Different enzymes have a different optimum pH at which their activity is greatest - a pH much lower or higher than this enzyme activity decreases and stops
Different parts of the digestive system have very different pHs - the stomach is strongly acidic, and the pH in the small intestine is close to neutral