When a gap between the neck and bullet is created by rising pressure, but before the neck is pushed all the way to the chamber wall, combustion gases leak past the mouth of the case. When the gases leak at a sufficient rate to increase the pressure forward of the case, which is also helped by the bullet moving forward to seal the bore, the pressure compresses the (clean) air between the case and the chamber and pushes a limited amount of dirty combustion gases into that space. At the same time, internal pressure is expanding the case and pushing air out of the same space, thus the carbon rarely gets past the neck. It seems to be low pressure rounds that don't seal the body of the case to the chamber walls that exhibit carbon further down the case.
Why the waves of carbon on the neck? That is a tough question. I really don't know, other than to say that it would take very uniform conditions to NOT have inconsistencies in the encroachment of carbon into the gap. Gas finds the path of least resistance.