Magic may well have been real. Healing crystals, shamanry, witchcraft, voodoo, things of this nature may have been real at one point and have since been patched out. These could have simply been glitches in the program.
We’ve all heard of glitches in games that can be exploited that eventually get patched. Could have been real.
That is actually the entire premise behind the book series Magic 2.0 by Scott Meyer.
People find the data file for our simulation and modify it to do “magic”.