Why does cesium have a positive electron affinity?
All elements have a positive (first) electron affinity, except noble gases, for which it has not been measured conclusively, but might be either slightly positive or slightly negative.

You can more clearly see the reason why electron affinity is positive if you think of the opposite process: detaching an electron from the negative ion X– to form neutral atom X. Because the anion X– is stable, it takes energy to take away the electron.