It’s actually related to this post: Your Bass "Ah Hah!" Moments - #34 by gcancella
Technically every scale has n modes, where n is the number of notes within the scale. The chords are basically carved out of the modes.
It all boils down to knowing your scale so well you can start it from any degree and end in the same degree an octave up.