This I'm going to disagree with. D&D magic does D&D magic and pretty much nothing else. It is, in no way, actually wired to fantasy stories. Heck, even the magic of Vance isn't D&D magic, despite then moniker. And, funnily enough, Vance's fantasy was far more SF than fantasy anyway, seeing as it was set in a distantly far future where the magic was meant as technology. So, even the base inspiration for D&D magic is grounded (extremely loosely) in SF more than fantasy.
D&D magic is a singular thing, created for a game, that has virtually no parallels in fantasy genre literature.
I didn't say D&D magic is tied to fantasy games. I said D&D magic is tied to fantasy. Because D&D magic is
- completely unscientific
- doesn't attempt to be explained by science or logic
- has zero limitations
- offers a wide array of effects
- uses a memorize and forget system which is not tied to nature nor explained scientifically
- uses a spell slot which is not tied to nature nor explained scientifically
- And new to 5e, the spell memory system and spell slot system are used together to cast spells but are tied together as the same system
- burning hands
- charm person
- comprehend languages
- disguise self
- false life
- fog cloud
- jump
- shield