This is a cognitive task aiming to assess whether kids can trade a small reward now for a bigger one later (it tests inhibitory control and ability to project oneself in the future). This experiment was conducted by comparative psychologists and, if I recall well, they also compared the kid’s performance to that of some primates to understand the evolution of the human mind.
As we say in France…cheh !