When John was in Afghanistan, magic was homey, a way to feel his mother's love in the middle of a godforsaken desert. He didn't do anything useful, just made sketches dance on the page or sent up a few sparkles from his athame in the middle of the night. It was enough to bring back that strange and secret year when he turned eleven, and his mother fed him forget-me potions and taught him lots and lots of words in not-exactly-German.
When John was at McMurdo, magic was helpful, a way to warm the covers before he got into bed, to quickly check that nothing was frozen in an engine without getting out and looking, a way to make six month old pictures in Playboy more interesting when he couldn't get hold of porn tapes.
When John was in Atlantis, magic was necessary. He used it to transfigure oxygen in a couple of bad cave-ins, and to understand the puddlejumpers a little better, and once to help stabilize a bad cut Teyla got pulling Rodney's ass out of danger.
But the thing that magic always, always, always was, was a secret. His mother had given him the first cup of forget-me and said, "This is a dangerous thing you can do. People don't like dangerous things. They lock them up and study them and hurt them. This is a secret."
And so John had never told anyone, not the girl he'd almost married, not the chaplain who'd put his head together after Afghanistan, not a doctor or a teacher, and not anyone in Stargate Command, even though he was now privy to the world-shaking, earth-shattering secrets of several world governments. He'd kept his magic use hidden, in rooms where he was alone, or in the dark where no one could see. He's not sure he would have used magic on Teyla that one time, except Rodney was building a transmitter beacon so the rescue party could locate them, Ford was guarding the cave entrance, and Teyla herself was unconscious.
But now the power was out, and Elizabeth had ordered everyone confined to their quarters until daybreak or the engineers had rebooted the system, whichever came first. John convinced her he should patrol, to make sure no one was lost or hurt or trapped. They were low on batteries and lightbulbs, and magic was easy in Atlantis, so he turned off his flashlight and cast a Lioht when he was out of sight of the command center. And it might have stayed secret, if Beckett hadn't come up on John from behind, before he had a chance to end the spell and turn his flashlight back on.
"Major Sheppard?" said Beckett, and then he jumped back and covered his eyes when John swung around and flashed his athame in his eyes.
And John had to say, "Niht," and wait for the fallout.
But it wasn't quite what he was expecting, because Beckett first said, "Finite Incantem," and then he said, "Lumos," and then he said, "You are a wizard! Why don't you have a wand?"
Because it turned out that what wizardry really was, was an expression of the ATA gene, and the city itself was a huge fucking athame (or wand, insisted the wizards and witches in the expedition who had gone to proper wizarding schools), and the key to understanding Ancient technology was the realization that their technology sufficiently advanced to be indistinguishable from magic was, in fact, an extremely advanced form of magic.
John didn't really care about the particulars of the technical stuff. It was good enough for him that it led Carson to a major breakthrough on the gene therapy, and Rodney and Zelenka and the rest of the scientists to several major breakthroughs on the Ancient technologies, and it let the linguists get cracking on the Gate translation protocol mystery.
What he cared about was Markham showing him how to build a racing broom.
When John hovered above Atlantis, high enough that people looked like ants but low enough that puddlejumpers looked like birds, magic was fun.