If Oxygen has a lower electron affinity than Sulfur, then why doesn't sulfur has a lower electron affinity than selenium? I've read that oxygen has a lower electron affinity (as shown the picture below), because it has a smaller atomic radius than sulfur and thus the electrons experience significant electron-electron repulsion.
However, I was wondering... Why is this not the case for sulfur and selenium or chlorine and bromine? Because of sulfur's and chlorine's smaller atomic radius compared to selenium and bromine, the incoming electron should also experience a slight electron-electron repulsion (just like it does with oxygen), so $\ce{Se}$ and $\ce{Br}$ should have a higher electron affinity.
This is likely due to second period elements' being quite small, so electron-electron repulsion is much more significant than in a third period element. The general trend is that EA is more positive as you move down the periodic table since effective nuclear charge is the same, but the electrons are farther away from the nucleus. Maybe it's easier to consider the second period the anomaly...