There are two answers to this question, both of which are actually very practical. The first answer is that the afikoman isn't to be eaten until the end of the meal, so hiding it means you won't accidentally eat it early. The other answer comes from the Talmud: hiding the afikoman keeps the children awake, waiting to go search for it.

haggadah Section: Tzafun