What is the purpose of Beowulf? Not today, but for the Anglo-Saxon people.
When Beowulf was first transcribed into Old English by Anglo-Saxon monks, England was not yet the unified country we know today. One of the factors that eventually brought about that unification was the spread of Christianity, which was still in progress at the time of Beowulf's creation.
Because Christianity was still relatively young, we see a mixture of pagan mythology (specifically the god Woden) and Christianity in the story. Scholars think that it is possible that the Christian references were not part of the original epic, but were instead added by the Christian monks that wrote the poem down for the first time. This seems like a good possibility, especially when the reader encounters passages like this:
Beware, those who are thrust into danger,
Clutched at by trouble, yet can carry no solace
In their hearts, cannot hope to be better! Hail
To those who will rise to God, drop off
Their dead bodies, and seek our Father's peace!
This passage comes at the end of the section of the poem that first describes Grendel's attacks on Herot. It is easy to imagine a monk copying the poem and then tacking on this monotheistic reference to the Christian God.
In this sense, we can think of the purpose of Beowulf as way to bolster the development of Christian faith and thought in a region of the world that was still making the transition from polytheistic mythology.
Beowulf's origin is unknown. That said, it has changed over the many generations it has been a part of the world. Originally, the epic tale was told by scops (singers who told stories to entertain), given that it came to exist far before the written world was universalized. The epic, now, is told from a third-person omniscient point-of-view with a Christian perspective.
As for the purpose of the epic tale, one could only suggest the reasons behind its creation. Some have stated that the purpose of the tale was to elevate the characters of the Anglo-Saxon culture to be ones which the society deemed the most important. Therefore, by naming specific characteristics as important, other people (hearing the tale) would strive to be more like the characters in the tale, mirroring the desired behaviors and beliefs.
Essentially, given the multiple unknowns about the text, one can only assume that the tale functions very similarly to the myth tales of every culture. Myth tales function to offer readers insight into the importance of morality, the origin of specific thoughts and ideals, and the elevation of specific characterizations. Outside of assumptions, one can only justify Beowulf's purpose by interpreting the text, making a hypothesis about its nature, and supporting said hypothesis with textual evidence.
So much is unknown about the origins, authorship, and overall purpose of Beowulf that there are no really definitive answers to this question. Nevertheless, we can still offer suggestions of varying degrees of plausibility. As a previous educator has noted, scops, or itinerant poets, would travel around the country reciting the poem at various social gatherings. The primary purpose of Beowulf, as with all such epic poems, would have been to entertain.
Yet there was also a didactic purpose involved, a desire to teach and to instruct. At the same time as being regally entertained, Beowulf's audience was being taught what it meant to be a warrior, to be a loyal and faithful servant to one's lord and master, to show heroism and courage in the face of seemingly insurmountable odds. The character of Beowulf stood as a shining example of how a man, especially a nobleman, should conduct himself—an ideal to which every red-blooded Anglo-Saxon male should aspire.