There is a lot in fantasy, especially D&D, that is handwaved away. Anything that seems anachronistic or defies physical laws as we understand them is "magic".
Even things that are explicitly stated to be magic rarely have any explanation as to how/why the feat was accomplished, beyond "a Wizard did it...probably", or "an act of the Gods".
I remember in an adventure encountering a waterfall frozen in time, presenting an impenetrable barrier akin to a wall of force. As a much less experienced player, I assumed that the means by which this was accomplished were naturally part of the game's lore/rules, but after making a few checks, the DM shrugged and said "uh, an artifact was used".
It's probably best not to scrutinize these idiosyncrasies of the game too much. If you stare at the window dressing for awhile, you might realize that it's a matte painting or a mass of pixels, and maybe that takes the sense of wonder out of the proceedings.
It is frustrating to a point that precious few people who live in a D&D world are asking the kinds of serious questions about how their world works that real-world scientists have done for centuries, and that if your character wanted to to delve into this sort of thing, there is no set path. Often, we're told magic has laws it must abide by, but beyond player spells and abilities, the idea of laws goes right out the window if it makes for a cool adventure.
Unfortunately, at some level, you just have to shut your brain off and enjoy the game. Even if you could find a true answer to how dragons fly or breathe various forms of energy at people, it probably wouldn't help you very much, because figuring out how to warp or prevent these abilities, or emulate them yourself, would probably toss ideas like game balance out the window.
The game doesn't currently make a distinction between "weird natural phenomenon", "beyond human abilities", "outright violations of physical laws", and "good ol' spells", even when that would be useful to have. So like anything else, if there is an answer, it's up to the DM.
Even in our world, we can encounter things the ancients built and ask ourselves "how was that done? could we even do that with our current technology?". That doesn't necessarily mean magic (or aliens!) was involved. It's just a mystery, and sometimes there doesn't need to be an answer- just knowing such mysteries exist might make the world seem a more wonderful place.