Discard any thought that "it's only money." Gold is more than that in Beowulf. It is a symbol of all that is good.
First, it is a sign of the functioning of a society. Gold was earned by heroism, as it was by Beowulf when he destroyed Grendel and Grendel's mother. Perhaps it is better to say that heroism and the fame that accompanies it are acknowledged by gold, just as heroism in our military is acknowledged by medals and other honours. Without the ability to acknowledge great deeds, much of the ability to inspire them is gone. A king without rings cannot be the generous "ring-giver" that a hero loves to serve, just as a country that does not honour its soldiers may have trouble attracting recruits.
When Beowulf returns home, however, we see gold flowing in the opposite direction, from the hero to his king. He freely hands over his new-won treasures to his king, putting his fame into the collective store of his people's fame as his treasure goes into the nation's treasure, and allowing the king to keep the gold circulating as fresh rewards through the society, like the life-blood circulating in a body.
But kingdoms rise and fall, as Beowulf himself rises in the first half of the poem and falls in the second. We are directed to this reality by sections of the poem called the "the Lay of the Last Survivor" (lines 2247–66) and the Father's Lament (lines 2444-2462). When the kingdom falls, its fame, its memory, and all proof of its existence and former greatness are literally carried off or buried with it in the form of treasure.
Such a treasure is kept by the dragon. It is described thus: iron rusting, armour decaying, cups unpolished, and only the royal standard still bright. When the dragon is dead, Wiglaf makes sure that this standard is brought to Beowulf as a portion of his victory spoils, but also as a symbol of them.
This standard is like the one raised over Scyld Scefing at the poem's start that was sent out to sea with him. The standard seems to symbolize the value of his leadership. It is a statement of his greatness during life and a statement of former greatness after, like a monument or cenotaph. Yet it can be taken up again by a person with the heroic qualities to match its former holder.
Dragons hoard treasure, keeping it from circulating in a way that seems deeply wrong to the people in Beowulf. Imagine something you value locked away from all use, such as a fortune in a Swiss vault, while people starve for lack of money, or a great work of art like the Mona Lisa, locked in a collector's safe, never seen, giving joy to no-one.
The dragon, like a king, is a "hoard-ward," but one who keeps, like an evil king, the hoard locked up. The poet could have explained the wrongness of this by telling the Christian parable of the Talents, but his pre-Christian predecessors would have understood it just as well. Imagine a gift like Beowulf's strength not used for the protection of his people. Imagine the example he set for young warriors, never set. The hoarding of gold without the giving of gold is the same kind of sinful waste.