2500 years ago Pythagoras discovered musical harmony in simple ratios of frequency. The story goes that he heard harmonious sounds from the blacksmiths' hammers; a hammer at half the weight sounded twice as high (Octave; 2/1), a pair at 2 to 3 sounded great (Perfect 5th; 2/3).
Pythagoras made a system to divide the Octave through multiplying by 3/2 to get the Circle of Fifths and multiplying by 4/3 to get the Circle of Fifths in reverse order (Fourths).
Pythagorean Temperament worked nicely for music in those Medieval times. The Root, Fifth, and Octave were recognized, other Intervals, and changing key were of the devil!
The system has what you might call... interesting features: