Actually, if you go far enough back , magic and science were the same thing . Here's a short youtube video on the subject.
There was a time before the scientific method when "doing cool stuff" was simply a bag of tricks passed down. And, before there was such a thing as a modern university, people didn't publish their findings openly for everyone to build on. Instead, they'd hide them away in their own temples or secret societies, which would be taught to initiates as 'secret arts'. You've heard of the Egyptian magicians? One of their tricks was the world's oldest battery .
So there's a lot of overlap between what we today think of as two distinct disciplines: "Magic" and "science". Before the scientific method, no one knew for sure why these things did what they did; there wasn't a theory of electromagnetism or some such, so "spirits did it" could be as plausible a story as any.
That continued up into the renaissance; Isaac Newton studied the occult as well as gravity, and John Dee , remember as an occultist, was also a mathematician and an astronomer.
Much of our pursuit of knowledge has been all about digging into these old magic tricks, creating a theory to find out why they work, then confirming them by experiment. Sifting out the nonsense from the stuff that's really valuable. Alchemy becomes chemistry, astrology becomes astronomy, shamanic intervention gives way to observational diagnosis and treatment.
So old-school "magic" is really just the old word for "knowledge", or "wisdom", from which we get our word "wizard". Since that time we have been separating the disciplines out into the study of the supernatural (religion) and the study of practical effects which are the outcome of natural laws ( natural magic => science).
You might say science is magic that works.
Respectfully,
Brian P.