What is interesting is that master composers often broke the "mathematic" rules.
Schubert, Beethoven or Chopin for example have sometimes very strange and unbelievable beautiful harmonics sprinkled in. Whereas mediocre composer do not do this, they are predictable.
Music theory is descriptive rather than prescriptive. Its purpose is not to tell you what sounds good, but to have a common language to describe what you've heard.
I don't think it's helpful to think of music in terms of mathematical "rules", but more in terms of cultural variation on what is acceptable. Now this is my perspective, after spending a long time steeped in this stuff, but feel free to disagree: The history of music has been oversimplified and done a disservice by its characterization as "great men" breaking all the rules. Taken to its extreme, music gets better when a greater man breaks more rules. That's obviously a little silly if you ask me.
Dissonance (a "broken mathematical rule") has as much a right to exist in music as consonance does. There is a constant tension between consonance and dissonance, and it is that dynamic tension which is exploited for affect or structural definition.
So what we have in the case of Schubert, Beethoven, and Chopin is not so much the breaking of mathematical rules. In my opinion, they are just examples of expert judgment applied to the tension and release within an artistic work.
Yes, of course, does breaking the rules not lead to better music automatically.
But strictly adhering to the cultural/mathematical rules seems to lead to mediocre results.
One thing I like to do with my sizable sample library is smush different samples together that would be "wrong" by a strict, surface theoretical view. There's probably theory to explain why two samples in two different non-relative scales can sound good together, but I don't know it. And if someone knows it, I would like to know! Then I can be more intentional and rely less on trial and error.