# What is the origin of the energy measured by electron affinity?

I understand that electron affinity is the energy released when an neutral atom catches an electron to form an anion. As it's answered here (If energy is required to add the electron to gaseous atom then why further energy is required to remove it?), "it's the energy change when an electron travels from infinity to the atom to create the negatively charged ion".

So far so good, but, what's the mechanism for that energy to be released? Let's take, if I understand it right, the initial state, with a neutral atom X, and an electron at infinity. Neutral atom X doesn't have any net charge, so there are no effects from being immersed in the electron's electric field. So if I want to take the electron to the neutral atom, I have to do work and carry it over there. So up until now, the electron affinity is negative (I did work, none energy was emitted). But the fact is that this process do emit energy, so I'm guessing that:

a) My previous analysis is incorrect.

b) There's a mechanism in play when the electron is near the neutral atom that I don't know of or I can't see that accounts for the emission of energy. My intuition tries to look for electric effects, but then I'm reminded that the neutral atom has no net charge :-/

However it is not this effect that binds the electron to the atom. The electrons in atoms are delocalised objects - you can think of them as being spread out over the whole atom. The electrons shield each other from the nuclear charge so the outermost electrons experience a net nuclear charge that is approximately the nuclear charge $Z$ minus the sum of all the other $Z-1$ electron charges.
But this shielding is not perfect. If we add an electron to a neutral atom then the new electron occupies the lowest energy unoccupied orbital. If the shielding were perfect the nuclear charge our new electron experiences would be $+Z$ from the nucleus and $-Z$ from the other electrons, i.e. zero, and there would be nothing to hold the extra electron to the atom.