Dr. Peter Gray is an evolutionary psychologist that studies how people learn and a huge advocate of play. Learn more about his work at http://alternativestoschool.com
"The most effective kind of education is that a child should play amongst lovely things." - Plato
Why are children playing? They are playing because they are instinctively driven to play. Their nature want to make them play.
Well then you can ask the question, why does their nature want to make them play? As an evolutionary psychologist, I say that that is because over the course of evolution natural selection selected this kind of behavior and created the neural mechanisms that motivate play and play in certain kind of ways especially social play with other children.
This occurred as a way of ensuring that children will practice and learn the skills and values and knowledge that they need to acquire in order to develop as ultimately as adults in the culture in which they develop.
So play is ultimately serving the function of education.