The Octave is given to us by physics. It is defined  as the the space between two pitches, whose frequency ratio is two to one. What happens to that interval is determined by man. Western culture has divided the octave into twelve equal increments. Each of which spans a different interval to the root, and is named for its relationship with the root. In addition to the octave itself, physics also provides overtones which govern how one pitch will sound with another. Each one of the intervals on the left has a unique musical signature, and you have a subliminal awareness of every one. The laws of  harmony are a study of what happens when we hear music.  We all  instinctively recognize what sounds right or wrong because there is  an apparant truth in music that does not need to be proven, just understood.
First there were Modes. Named after Greek tribes, each spans an octave using seven notes and has its own unique sound. Several of the modes became our modern Major and minor scales, while others feature in many forms of traditional and modern music. The purpose of a scale or mode is to select seven notes from the twelve available in any octave. Diatonic harmony calls for all elements of a given piece to be created using only  the notes contained in the chosen scale.  When we observe the rules the result is always safe consonant music. The History of music is a record of how the rules were stretched, broken, and eventually re-defined. When no rules are observed, the result  is musical chaos. Harmony  still conforms to the  traditional laws  because they explain the way we hear consonance, dissonance, tension and resolution.