notice how at the 12th fret the distance between fret and bridge is double wat it is from neck to bridge. therefore it has half the wavelength. and therefore twice the frequency
sorry if thats a bit physical for u
um in terms of music each note in an octave have the smae role in music. they fit together.
i can go into the maths behind it but i dont know if thats helpfull :D