Obviously these are works of fiction but I've always wondered to what extent the trope was inspired by real discoveries.
Hi, you may be interested in a couple of posts from the FAQ:
Were the tombs of South American civilizations the booby-trapped nightmare we see in entertainment? - South & Central America, Egypt
Many fantasy/historical computer games and RPGs feature "dungeons", ie a large labyrinthian set of tunnels, rooms, traps etc. Is there any historical basis for dungeons? - various labyrinths & catacombs
If you have follow-up questions, since these posts are archived, just ask here & tag the user's username to notify them