Why is it necessary to correct the pressure of a gas that is collected over water?

Because the total pressure is the sum of the vapor pressure of water + the pressure of the air. Said another way, the water in the bottle exerts a pressure, too, and you want the pressure of the dry gas, not the wet gas.