When the peaks often coincide they produce a chord, or an agreement. When the peaks rarely coincide they are discordant and the sound is disagreeable! So we can see from the table that C and G will sound the best together as C has 2 peaks for every 3 peaks that G has. The next best note for C is F, which is actually the inverse ratio of C:G. Then comes E, giving us the C-E-G chord, which we already know sounds very nice! The ratios for C-E-G are 4(4:5:6)/4. In the minor scale we have C-E♭-G which is 6/(6:5:4).
Either the numerator or the denominator must be able to be multiplied to a common, small value for the two notes to sound good together. You might think that E♭-E would sound good because they both have a 5 but it doesn't work that way. You would either get 24(24:25)/20 or 30/(25:24), neither of which would sound good because of the high numbers needed to find a common frequency.