When the pendulum bob reaches the mean position, the net force acting on it is zero. Why then does it swing past the mean position?

Its velocity is maximum.

The swinging motion of a pendulum is a result of the interplay between two forces: the gravitational force and the tension force in the string or rod that supports the pendulum bob. When the pendulum bob reaches its mean position (the lowest point of its swing), the net force acting on it is indeed zero.

However, it is important to note that at the mean position, the direction of the velocity of the pendulum bob changes. As the bob moves upward from the mean position, it gains potential energy while losing kinetic energy. This potential energy is a result of its position relative to the mean position where it has the maximum potential energy.

Due to the conservation of energy, the potential energy gained by the pendulum bob as it moves upward is then converted back into kinetic energy as it swings downward. This process causes the pendulum bob to swing past the mean position, moving from one side to another.

Therefore, even though the net force acting on the pendulum bob is zero at the mean position, its kinetic and potential energies are continuously being converted back and forth as it swings, allowing it to swing past the mean position.