I think the energy used for "magic" or whatever you want to call it is residual energy left over from the moment of first creation or the "Big Bang" depending on if you want to view the beginnings of this universe through the lens of religion or science. Something (divine source or other outside influence) caused the potential energy of creation to be released at the moment of the Big Bang and the universe was born.
I believe that, for the most part the universe and all life within it was allowed to evolve and develop randomly with occasional nudges here and there by what we now see as various gods and goddesses when some random development seemed particularly interesting or promising. Eventually on this little rock, those combination of chance and directed nudges evolved into a critter that calls itself Homo Sapien sapien... a.k.a modern humans.
Humans, being the inquisitive little buggers they are, somehow learned how to sense, tap, and somewhat control/direct the residual energy left over from the first creation for specific purposes and they came to call it "magic."
Because magical energy is part of the same energy that is responsible for the creation of the universe it is bound by the laws that govern the universe, meaning you can influence events and create changes in reality, but only so long as those changes obey the laws of physics. Things that seem miraculous or appear to violate the laws of physics *as we understand them* may simply be acting in accordance to physical laws science hasn't been able to figure out and define yet. If you look into the science of quantum physics, string theory, membranes, parallel universes, etc you can start to see glimmers of some of the same theories and "laws" employed in the practice of magic.
And like the laws of physics, the laws of metaphysics are completely neutral. There is no such thing as white/good magic or black/evil magic outside of the mind of the magician because there is no such thing as white energy or black energy. Yes, magical energy has polarity in the same way that electricity has polarity, but that has absolutely nothing to do with the ethics or morality of "good vs. evil," helpful vs. harmful when practicing magic. Just as the electricity that powers the machines that saves the life of a premature infant is no different than the electricity that powers the electric chair used to execute a mass murderer, the energy used to help heal a sick coven member is no different than the energy used to curse a perceived enemy. The only difference is in *how* they are used.
So, I believe that
1) the energies used in magic have always been active in the universe long before the evolution of humans (or any other intelligent critter),
2) it serves the purpose of sustaining and facilitating the growth and evolution,
3) it exists independent of humans (or any other intelligent critter),
4) humans have learned to tap into this energy and use it for their benefit but in no way does it exist exclusively or even primarily for humanity's use or benefit.