The Danes bury the treasure because this was one of Beowulf's last commands before dying after fighting the dragon. The treasure is to be buried rather than shared by Beowulf's warriors, as would be the usual dispensation of the spoils of battle, because Beowulf's warriors had behaved in a disloyal and cowardly way. Except for Wiglaf, all of Beowulf's men abandoned him by running away, refusing to help him slay the dragon when it became clear that the dragon was winning his battle against the King. Beowulf's warriors, except for Wiglaf, betrayed their responsibilities and therefore their very reason for existing in their culture. Such cowardice and treason would not be rewarded. The treasure is walled up in the tower built by the sea, at Beowulf's direction, along with his ashes.