Five Million Years to Earth (originally known in the UK as Quatermass and the Pit) was a 1967 Hammer Film adapted from a 1958 BBC TV serial of the same name. This was the third Hammer Film adaption of one of Nigel Kneale’s Quatermass serials, featuring the British rocket scientist, Bernard Quatermass’s encounters with X-Files-esque alien incursions.
For those who haven’t seen it, the film starts with the discover of an anomalous primate skeleton by workmen digging a new underground station in Hobb’s End, London. The large-brained primate is found in strata much deeper than it has any business being. If this discovery weren't enough, digging is halted again when what is taken for a unexploded German rocket is found nearby--only the so-called bomb isn’t magnetic.
Quatermass gets called in, and soon discovers the thing isn’t some V-rocket, but something far stranger--an alien spacecraft. The history of Hobb’s End as “bad place” plagued by ghost sightings and poltergeist activity, and a shape suggestive of a pentagram on the outside of the craft, leads Quatermass to link the presence of the craft with the human perception of supernatural evil. When they are finally able to get inside the craft and find tripodal, arthropod-like creatures with horns--suggesting the horn’s of the devil--Quatermass sees his theory as confirmed.
A few more experiments and a lot more ominous psychic phenomena later, and we find out the aliens are Martians who, like Lovecraft’s Old Ones, experimented on human ancestors and influenced our evolution. Their race dying, the Martian’s came to the “hostile” environment of earth and tried to turn humanity into a mental continuation of their race, if not a physical one. This includes, unfortunately, their violent attitudes about racial purity, which awaken horribly in London humanity in the film's climax.
It occurs to me that this might be a good explanation for dungeons, if one wanted to go in a weird science-fantasy direction, rather than a “mythic underworld” one.
Consider this: a spacecraft from a dying world crashes in the ancient past on a fantasy world. Their psychic power is considerable--maybe they're those perennial brainpower-baddies, the mind-flayers, or maybe they're the thri-keen (why not give those guys something to do for once?). This race goes about influencing the evolution of the world. Maybe orcs and other humanoids are derived from hominid stock, or maybe, in a twist, humans (the moral mixed-bag), are derived from goody-goody elvish or dwarvish stock. Unlike Qautermass’s Martians, maybe our hypothetical race doesn’t stop there. Perhaps a whole lot of dungeon monsters are part of their attempt to recreate all the flora and fauna of their dying world? Other things, like undead, might be manifestations of their powerful psychic residue lingering in their semi-sentient technology. You get the idea.
This would probably work best in a world with only one dungeon (a megadungeon, naturally) where this was the “ultimate secret” in its lowest depths. Who knows, after discovering the spacecraft in the dungeons lowest levels, and mastering (or not) the alien psychic-tech, maybe the PCs go on their own voyage of conquest High Crusade style?