The oscillation of one pendulum sets the horizontal tube vibrating at the same frequency. The tube is thus shaking the other pendulum at the same frequency as the first ball. In other words, all the other pendulum experience a periodic driving force at the frequency of the first ball.
Resonance occurs only for the pendulum with the same length since its resonant frequency matches the frequency of the driving force. Which is why only one ball goes into large amplitude oscillation.