In going through the equivalent of an "series binge" of Andre Norton, I realized how large a part ruins play in so many fantasy and science fiction stories.
Ruins permeate so much of the science fiction and fantasy landscape: old buildings which dot landscapes and planets, oftentimes without a hint as to why they were put in place. In Andre Norton they appear as ruins of the Old Ones in Witch World or the Forerunners in her science fiction. In Tolkien they are the remains of the Men of Númenor at Amon Sul and The Argonath and Amon Hen or the Mines of Moria of Durin's folk. In Edgar Rice Burroughs they are the dead cities of the Orovars, built on the shorelines of receding oceans. In Robert E. Howard they are the nameless brooding buildings (filled with rumors treasury) that abound in Hyperborea. In H. Beam Piper, they appear not so much as ruins as in the remnants of a civilization (The Federation). And in post-apocalypse novels, they are the remains of the modern world as we know it (depending, of course, of whenever the collapse actually occurred).
Ruins provide several functionalities in these stories. They can be the point of the quest, or serve as a sort of brooding background to the characters as they move through the landscape. They are a thing of mystery and speculation: usually little is known about the builders or their purposes or, if both are known, it is acknowledged by the characters that such things cannot be built again by those in their day. They serve as sentinels of a past age, now lost, at best forming a location of perilous comfort, at worst a place of danger.
Our own ancestors were not immune to these things; in Old English there was actually a word for this, dústscéawung, literally "contemplation of the dust". We have at least one work in the Old English corpus of work called "The Ruin", in which the author contemplates the remains of the Roman works that existed in his time:
wealstān; wyrde gebræcon
burgstede burston; brosnað enta geworc.
Hrōfas sind gehrorene, hrēorge torras
hrīmgeat berofen hrīm on līme
scearde scūrbeorge scorene, gedrorene,
smashed the city; decayed the work of giants.