Originally Posted by
Seraph522
It's older than Tolkien; he likely drew heavily upon the story of Fafnir from Norse mythology, a dwarf-turned-dragon that guarded the hoard of Andvari, when creating Smaug, and Beowulf features a hoard-guarding dragon as the final opponent of the eponymous hero. Of course, dragons appear worldwide in mythology, so this is mostly a Western European trait of dragons rather than a universal one, and Tolkien popularized the trope of a treasure-guarding dragon in modern fantasy works.