Recounting his heritage also serves to emphasize Beowulf's connection to the legendary hero Scyld Scefing, who is portrayed as a revered and victorious leader in the poem. By associating himself with Scyld's legacy, Beowulf enhances his reputation and suggests that he possesses similar qualities of bravery, strength, and leadership.
Furthermore, describing his heritage allows Beowulf to establish a sense of kinship with the Danish king Hrothgar, whose kingdom he has come to aid. By highlighting their shared ancestry and lineage, Beowulf creates a bond of trust and mutual respect between himself and Hrothgar, which is essential for their alliance against Grendel and the other monsters.
In summary, recounting his heritage serves multiple purposes for Beowulf. It establishes his noble lineage, emphasizes his connection to legendary figures, and fosters a sense of kinship with Hrothgar, thereby reinforcing his credibility and heroic stature in the poem.