Chemistry - Rusting in every other bar
Rebar for concrete is frequently stored in heaps, and rusts. It actually develops a stronger bond if it is not too rusty, because the rebar surface is rougher and better able to adhere to the hardened cement. It's interesting to see a pile of old rebar with a fresh delivery on top - silvery, not a trace of rust - on top of a pile of rebar that looks almost disgustingly rusted. And then you think, yeah, but the stuff on the bottom will have a better bond.
The key word in the observation about the fences is "sometimes".
I'm going to guess that the maker of the fence in the top picture also had a pile (or two) of iron bars, and some were rusty from being stored long or outdoors, or were a teensy bit different from some other pile of iron bars. This fence maker, knowing how his fence weathers, has to make it as uniform as possible, so he takes one bar from one pile, then a bar from the other pile... He prepares them identically, primes them identically, paints them identically... But then nature takes over and the most corrodable bar develops a spot, which spreads until it is all corroded-looking, before the more corrosion-resistant bar has even gotten started!
And then you come along and take a picture just before the other bars begin to corrode! This experiment is in the initial stages, not yet at equilibrium. Check back on the fence every year or two - I believe things will even out in time.