There are many explanations given for why we hide the afikoman .

The simple reason that we put the afikoman aside or hide it, is because we will eat this matzah only near the very end of the Seder, and we don’t want it to get mixed up with the other matzahs at the table

Some have the custom to hide the piece of matzah that was set aside for the afikoman , and have the children find it and then return it only in lieu of a promised gift. This custom is based on a statement in the Talmud: “We snatch matzahs on the night of Passover in order that the children should not fall asleep.” In other words, the game of hiding the afikoman and the accompanying bargaining for a gift is an activity to engage the kids and make sure that they don’t fall asleep during what is invariably a long evening.

Finally, hiding the afikoman has symbolic meaning as well. Just as we search for the afikoman , we seek out the injustice in our societies, the hidden as well as the revealed, and organize to transform these dark places into ones filled with light. We seek within ourselves for the places where we are complicit in injustice and pledge to do better.

haggadah Section: Tzafun