The epic Anglo-Saxon poem Beowulf is, in part, the story of a beleaguered town who is saved by a hero. For years, Hrothgar and his people were tormented by the monster Grendel; the marauder had been plaguing the town and the people, enough that they lived in constant fear. Along cameBeowulf, a confident, even arrogant, young man who was convinced he could rid the Danes of their tormentor. He offeredhis services to Hrothgar, and soon after Unferth began his diatribe.
Consider Unferth's position: he is a proud lord who has to feel some shame and embarrassment at not being able to take care of this problem without help; he has had too much to drink, so he's speaking more freely than usual; and he's probably feeling somewhat jealous of someone who is so confident and fearless.
Unferth acts as a kind of foil to Beowulf. Where Unferth is rude and accusatory and boastful, Beowulf is collected and reasonable and explains what really happened in the incident with Brecca. One shows honor, and one does not. Later, Unferth does seem to have come to his sense of honor by loaning his faithful sword to Beowulf, and Beowulf honors him by accepting it.