While sustaining the G note into bar 2, the chord beneath it switches to Ebmaj7. G is a perfect note to play over Ebmaj7, as it is one of the four chord tones or that chord: Eb, G, Bb, D (see Figures ...