This illusion was discovered by University of California psychologist Diana Deutsch. Listen first with the left and right channels in balance, then isolate each ear. Though the pattern in each channel jumps around in pitch, when they’re combined we tend to hear two smooth scales. Why?
“It is as though the sounds gravitate towards neighbours, where ‘neighbourhood’ is defined not by the physical proximity of the causative events, but by adjacent places on the pitch spectrum,” writes philosopher Roger Scruton. “Yet the sequences as heard are played into neither ear, and represent no causally unified process in the physical world. The auditory Gestalt is not merely incongruous with the physical events that produce it. It is organized according to principles that are intrinsic to the world of sounds, and which would be operative even if there were no physical events that could be identified as the causes of the individual sounds.”
(Roger Scruton, “Thoughts on Rhythm,” in Kathleen Stock, ed., Philosophers on Music, 2007.)