I think it's actually a little more complicated than that. It is not just the spring that holds the action closed, but also the mass of the slide assembly. When the cartridge is fired, pressures are created by the rapidly expanding gases that push the bullet down the barrel and the slide mechanism to the rear. The action needs to remain closed until the bullet exits the barrel. The mass of the bullet is tiny compared to the mass of the slide mechanism, so even though the forces may be equal and opposite, the effect of the force on the bullet is dramatically greater than it is on the slide. It accelerates down and out of the barrel before the slide barely moves. The recoil spring adds to this basic mass differential.