I think Ruin Explorer covered that well. By extension, D&D-esque traps should exist in our real world, and by and large, they don't. No, Dungeons are full of traps because Gygax and company thought traps were keen.
I'm not sure that D&D was ever really based on what you have in the Real World, though. Conan, Fafhrd, the Grey Mouser, and others certainly ran into traps rather frequently, and they're among the entries in Appendix N which supposedly inspired the game.