Possible interpretations of the legend
Even today it has not been possible to establish the historical truth of the Pied Piper legend with absolute certainty.
Of the many interpretations, colonisation of the East by migrants from northern Germany seems most likely. The "children of Hamelin" were allegedly citizens of Hamelin who were willing to migrate, recruited by the ruling nobility to settle in Moravia, East Prussia, Pomerania or the monastic state of the Teutonic Knights. It is assumed that at that time, as nowadays, all the inhabitants could be termed "children of the town", or "town's children".
The "legend of the children's migration" was later linked to a "rat expulsion legend". This surely refers to the particularly alarming plague of rats in the mill town of Hamelin in the Middle Ages, and the more or less successful efforts to stem the plague by genuine, professional rat catchers.