For the first electron affinity, where an electron is added to a neutral atom, the attraction from the nucleus overcomes the the repulsion from the other electrons.
Subsequent electron affinities are often negative because now this process involves adding an electron to an anion, and electronic repulsion often overcomes nuclear attraction.