If the electron statistical distribution around the atomic kernel had been perfectly spherically symmetric, and if the electron occurance distribution had not mutually overlapped, than by the Gauss law of electrostatics, the net force between a neutral atom and an electron would have been zero.
But as neither of above conditions is true, a kernel charge is not fully screened off by electrons, acting as having a residual, "effective charge", what allows releasing energy by bounding an extra electron. See Slater rules.
An extra electron puts among other electrons some extra stress=mutual repulsion, what somewhat decreases this released energy.
As effective kernel charge and electron mutual repulsion ( classical and Pauli ones ) are 2 major factors affecting energies of electron orbitals in multi-electron atoms.
When the former factor is stronger, energy is released by an extra electron bounding, like for fluorine. And vice versa, like for helium.