The reason pepsin functions best at pH 2 is because the carboxylic acid group on the amino acid in the enzyme's active site must be in its protonated state, meaning bound to a hydrogen atom. At low pH the carboxylic acid group is protonated, which allows it to catalyze the chemical reaction of breaking chemical bonds