Beowulf tells us much about what it meant to be a warrior in the Germanic warrior culture around the early sixth century. Being a warrior was all about serving one's lord with loyalty and earning glory through one's exploits. It was about courageous forging ahead even when the mission seemed hopeless and about being ready to die with honor rather than survive with shame.
When Beowulf goes to Heorot, he is repaying a favor that Hrothgar had given to Beowulf's own father. Hrothgar had helped Beowulf's father through a difficult time, giving him shelter and preserving his honor, so now, part of Beowulf's honor is to repay his father's debt. And Hrothgar certainly has a great need. Heorot is being attacked by a monster named Grendel, a creature who stands outside the warrior culture of camaraderie and looks at it with envy. Grendel keeps raiding Heorot at night, killing and eating Hrothgar's warriors, and there is nothing Hrothgar can do to stop it.
This brings great shame to the Danes. Hrothgar and his men show the typical Germanic warrior system. The king, Hrothgar, gathers his men in his mead hall and gives them plenty of treasure, food, and drink in return for their loyalty and service in battle. But now, the system has faltered, and they cannot solve their problem. Therefore, Beowulf steps in.
Beowulf, of course, is also out for glory. That was how the warrior survived even if he were killed in battle, through the songs and great tales that preserved his memory and his deeds. Beowulf is out to have some of these songs and tales preserved about him. He will face the monster alone and without a weapon. This shows Beowulf's courage and his desire for fame, and he will not back down. Either Beowulf or Grendel will die that night.
Of course, Beowulf is victorious, and he is again over Grendel's mother. But years later, when Beowulf is an older man and a king of his own people, his land is ravaged by a dragon. Beowulf again thinks of the glory of a warrior as he determines to face the dragon alone. But he forgets that he is not only a warrior now. He is also the king, and his people depend upon him for their safety in more ways than one. Yet Beowulf does face the dragon, and now his desire for Germanic warrior glory gets him killed.