This anomaly has existed for years. Basically, the NR fare-scale for zones 2-9 is cheaper than the TfL-Ang for zones 2-9. If you look at the excellent webpage for the fare guides & tables, you will see that TfL-Ang rises very sharply between the zones 2-8 fare (£3·60 off-peak) and the zones 2-9 fare (£5·20 off-peak), thus “overtaking” the NR fare-scale (which stays at £3·60 off-peak for zones 2-7, 2-8, and 2-9). A particularly perverse illustration is Brentwood-Lewisham, where the fare depends on whether you go to/from Lewisham NR [National Rail] or Lewisham DLR [Docklands Light Railway].
In simple terms, as Mike has said, the NR fare-scale, when it applies, takes precedence over TfL-Ang. The key criterion for the NR fare-scale relevant here is “where part of the journey is on GN [Great Northern], SE [Southeastern], SN [Southern], SWR [South Western Railway], TL [Thameslink]”.
So, in my Brentwood-Lewisham example, the reason why Lewisham NR is cheaper (provided that you do not go via zone 1) is because part of the journey would go on Southeastern (specifically, between New Cross and Lewisham). Conversely, Lewisham DLR does not involve any of the train companies encompassed by the NR fare-scale, so it is charged according to the TfL-Ang scale.
In the OP’s example, the reason why Nunhead or Elephant & Castle are cheaper than Peckham Rye is, again, because part of the journey would go on Southeastern, whilst a journey starting/ending at Peckham Rye would not.
Brentwood is the only zone 9 station that is “native” to the TfL-Ang scale, hence why this anomaly is not well known elsewhere.