Electron affinity is the amount of energy "released" during the addition of an electron in the valence shell of an isolated gaseous atom. The sign convention is opposite to that of thermodynamics convention i.e. positive means release of energy.
For many non-metals, the first electron affinity is exothermic, i.e. positive while all second electron affinities are endothermic, i.e. negative.
As we already know that electron affinity is energy released (the term "affinity" implies an attraction for the electron), then why we consider endothermic cases using this term?