Symbolism, Imagery, Allegory
Look, it's a random story embedded right in the middle of the book. Sure, we might not have been thrilled for the timeout right in the middle of Ludovico's experience in the haunted room, but the ghostly tale he's reading can give us some real insight into the rest of the book.
Have a Little Faith
So this Baron dude is hesitant to trust a random knight who tells him to meet him in the middle of the woods. That's natural, right? But when the Baron decides to throw caution to the wind and follow the stranger, things start to get a little more interesting. Back in the real world, Em & Co. are learning that a little otherworldly intrigue isn't necessarily a bad thing.
Even though Em is a bonafide scaredy-cat, she hasn't really come across any malicious ghosts. The real baddies are very much alive and out to get her. It's kind of up in the air whether any actual ghosts exist in the book, but if they do, they're rooting for Em.
Get 'er Done
When the mysterious knight leads the Baron to a body—the knight's earthly body, in fact—the Baron knows what he needs to do. He has the body "interred, with the honours of knighthood, in the chapel of the castle" so that Sir Bevys can rest in peace (4.12.73). We're talking about an unquiet soul, here, lingering around until he's finally free.
Really, the rest of the book is all about a bunch of unquiet souls trying to get a little bit of that elusive peace. Check St. Aubert, for example. He dies at the beginning of the book, but Em thinks he might be hanging around to protect her. Or Signora Laurentini, who's very much alive but unwilling to forgive herself. The story of the Baron and Sir Bevys is an allegory that presents a decent solution: all these souls just need to be put to rest.