The locket itself has been created by Barry but this note had to been added later, after the Clays made Beetleburg their home. I imagine they added it when Agatha was still a little girl because they were afraid she will lose it one day hile playing with other children.
Please note the “reward” in the big capital letters - they had to be pretty sure that other people want return it just out of the kindness of their hearts.
I think we’re all experts in plagues now and we know that if it would really be a plague and since the brothers were hitting the bars since they arrived the whole Beetleburg would be in some serious troubles…