You can study magic without it being a science because it is NOT science.
Arthur C. Clarke said "Any sufficiently advanced technology is indistinguishable from magic."
Why did he say that?
He said it because advanced tech doesn't seem to follow the rules that we know. If we are ignorant of tech a TV SEEMS like magic.
And what's magic?
Magic is something that doesn't necessarily follow the laws of science and nature.
Here's a bit from TV Tropes Magic vs. Science
Magic is often seen as the realm of mysticism and a violation of scientific laws. Science is often seen as the realm of materialism and technology.
Magic cheats at Physics: Magic and its users create localized areas where the physical laws operate differently from normal. This
may be expressed as malfunctions to machines beyond a given
technological threshold, altering the combustion point of atmosphere
causes cars to fail and fireballs to form, or electromagnetic waves
collapse within magical auras.
Magic is Mysterious: Magic follows no rules at all, therefore science will never be able to explain it. This scenario tends to work
best with Wild Magic (the magic is released by the mage, but not
controlled) and Theurgy (the divine being decides what spell is cast).
The concept does not follow logically from magic gained from study,
becoming an Informed Trait.
Magic is an Ideology: Magic and science get along just fine, but the magicians and scientists can't stand each other. Petty rivalry or
hubris leads everyone on both sides to specialize in their field and
completely ignore the other. This conflict can sometimes take a
subtler form, where the magicians want to keep knowledge secret and
the scientists want it shared with everyone; which side is more
sympathetic tends to depend on whether the author (or readers/viewers)
think there really are Things Man Was Not Meant To Know...
Now, you may have an idea that because magic follows its own rules, that studying it would lead to its own branch of science, because, after all, if there are provable rules, that's what it might become.
You've forgotten one key point of magic, one that gets left behind in swords and sorcery: Belief creates reality.
So while there might be rules that wizards all collectively agree on, when a wizard starts experimentation on his own and finds something that works, teaching it is nearly impossible. It's his PERSONAL belief and theory, one that he arrived at after years of study, and now, he can cast an illusionary dragon.
Could he teach that to another wizard? Unlikely. If there's an apprentice/wizard relationship, it helps to start you off (because you have faith in your mentor's abilities, you see what they can do, and decide that's reality if only you try hard enough).
But once you get into the higher levels of magic, once you unlock the mysteries, it becomes more personal to you. You have your own magic words, your own faith in yourself and the way the world works.
Since you're warping reality and going 'round the rules of science, you're going to be eccentric and idiosyncratic.
Having a young, easily impressed apprentice would likely be a boost to your powers (and confidence in them) but every wizard can only learn so much from their mentor. Eventually they learn that all the "rules" that the wizard taught them aren't actually law.
Once that happens they lose faith in their mentor, and likely will no longer be able to learn from them (maybe they still can, but at this point they'll know they can do something different).
The biggest secret never told is this: there actually are NO RULES. None. The ones wizards think exist do because they were passed down, or make fro an easy beginning framework. It's likely that was done for safety. So you might drill into an apprentice's head three basic laws, just to keep the world steady. By the time you find out that the three basic laws can be broken, by then you might understand why they are in place and how much damage it could do if they WERE broken, and that wizards will go after anyone that breaks them.