It’s unlikely that he would say this to the gravedigger – as one would presume that the gravedigger would know all this very well. Not that Hamlet would be above a condescending passing on of obvious knowledge – but it feels more likely that he’s saying this to Horatio. Which reminds me of my pet theory that Horatio is more foreigner than friend. He affords the opportunity for Hamlet to explain customs and traditions that would not require explanations to a native Dane. Horatio allows Hamlet to give us some context.