This refers to the theme of growing up. The Cheshire Cat is cautioning Alice that while food is necessary to help one grow up, food alone is not enough and one also needs mercy and experience in order to become a (wise) adult. This can be demonstrated by Alice's experience in the small room when she eats the cake labelled 'EAT ME' and grows large, but is then too large to fit through the door; she has grown up very fast but has not shown wisdom. Nevertheless, the story is intentionally quite illogical and in Wonderland nothing is what it appears.
Some say that Lewis Carroll conjured up Alice's nonsensical world to give readers a way to escape the many troubles that plagued Victorian England. The story focuses on a theme of Alice growing up but within that theme, Carroll managed to turn many aspects of daily life, including eating and drinking, upside down. At the time in Victorian England, many people were starving and there were concerns over the safety of food itself. The Chesire cat is cautioning Alice, a Victorian who is probably often hungry, that although food can provide physical health and growth, she must have sense about what she eats in order to stay healthy and grow. Additionally, he cautions that mercy and wisdom are important parts of growing up. Victorians had rigid social rules that Carroll's novel turned upside down both with regard to the character's behavior and the events of the tea party. Throughout the story, Alice is confronted with these contradictory experiences that provide her chances to show compassion. Through them she gains more wisdom than mere food provides.