I highly recommend the book “How Equal Temperament Ruined Harmony (and Why You Should Care)” if you are interested in this subject.