Music is a language, theory is science. Seems very simple to me, but in reality the misuse of syntax has put a pox on becoming a musician historically. I'm a heretic, but I can explain myself.
In my experience as a guitar teacher most people consider "music theory" to be something like a set of rules. Alternatively, a set of instructions.
This is partially true, but ONLY within one context:
To become a classical music composer in the historical style of Bach.
More specifically, I'd say it's an obtuse scripting language that yields "classical music" when a data set is applied. Another way of putting is, your whim is the data set and if you follow the ascribed rules and instructions, the output will be classical music. Which is fine, if you live in the 1700's, perhaps in Austria. Some people virtually do, and have a wardrobe of frilly shirts to show for it.
Sorry to digress into Viking metal.
People I teach view the intellectual side of learning music to be something they can digest in a month or two, maybe even a few weeks.
Would they think the same about learning Spanish? Chinese?
You're learning labels for subjective human musical experience.
Grammar doesn't inform you as to what to say. It doesn't tell you how to describe what a flower looks like. You have to have something to say. Theoretically you don't need to know it, but you'll be limited in communicating.
You don't have to follow grammar (obviously in the 21st century...). Grammar allows you to communicate in a traditionally acceptable format. When you decide to break from grammar, you tend to fall into idiomatic styles.
You also are subject to being inadvertently comical.
Music as a language is no different. Music "grammar", when ignored means chances are you'll end up playing in an idiomatic style, and you'll also possibly risk being a cliche.
Ignore it and you mind end up whimsically playing circus music passages, out of tune, or out of key. Comical.
Learning music as a language.....
is a more appropriate description of what a person does when deciding to pick up an instrument than "reading the instruction manual" or "going over the rules". I know a lot of people view it as something akin to math. I also can hear a lot of people doing it as a math process.
There are grammar, vocabulary, and literature aspects to it.
How you form a sentence (melody). What style of phrasing (vocabulary). What stylistic antecedents you draw from (literature).
You can watch a video that tells you that "dogs don't drive cars" in order to not know that "Bob the Labrador drove his Tesla to Kroger" is probably not a sensible sentence. It's not a practical way of learning how to communicate, unless you want to be deliberately comical. Yet, this is how many/most people think or expects the process of making music to work. "Thou shalt not play parallel 5ths" is an adage in classical music, yet you'd be hard pressed to write a rock and roll song treating that as a rule or instruction.
Instead you use your "literary" experience, what you have listened to and love, as a filter for what you create. Non-metaphysically you're using your subconscious awareness, the parallel processing ability of a human mind, to effectively handle the math behind the scenes. That doesn't mean the process isn't super technical, maybe the most technical process humans do; but it is empirical observation that each human makes through experience being utilized that creates good music, not algorithms.
That an algorithm can make a result that sounds like music, does not consequently mean that is how all music or arbitrarily good music is made. Human subjectivity trounces that approach, despite being abstruse and indeterminate.
Learn music as a language, not a science. This is maybe the most important difference among musicians in my opinion. This should not be construed as simply some homily like "play from your soul, man" or some such; it is a very self-introspective awareness of how one does the process...... Learn music as a language, not a science.