Beowulf, in the Anglo-Saxon epic poem named after him, behaves heroically due to both honor and loyalty. And these, in Anglo-Saxon England, carry great importance. We know this because they have such a prominent place in the poem--a folk epic that reveals the values of the society from which it comes.
Yet, honor and loyalty are not necessarily the goals of Beowulf. Instead, they are means to an end. The pre-Christian element in the poem, a reflection of Greek thought as it is revealed in Homer's epics, sees salvation as deriving from one's reputation. In other words, immortality comes from being remembered. That is Beowulf's goal.
Beowulf will be remembered for his honor and loyalty, as well as his heroic deeds, great speaking ability, etc. This form of immortality is Beowulf's goal. Honor and loyalty are two means of his achieving that goal.
Beowulf is also, of course, very much a Christian poem, and particularly an Old Testament poem. Probably written by a Christian monk, the poem repeatedly praises God and refers to God's glory, but pagan (a nasty word that has come to be a put down religions use to condemn other religions) thought is also prevalent, and is the driving force behind Beowulf's heroism.