The earliest written source for this custom is the "sefer" "Ohev Yisrael" by Rabbi Avraham Yehoshua Heshel, the Apter Rav, written in the 1800s. He calls "schlissel challah" "an ancient custom," and offers several kabbalistic interpretations. He writes that after spending forty years in the desert, the Israelites continued to eat the manna until they brought the Omer offering on the second day of Passover. From that day on, they no longer ate manna, but food that had grown in the Land of Israel. Since they now had to start worrying about their sustenance rather than having it handed to them each morning, the key on the challah is a form of prayer to God to open up the gates of livelihood.