Humans, and children in particular, learn through play. Play is how we develop new models to understand the world around us.
Expert game designers are well-versed in sociology, psychology, and the cognitive sciences that underlie motivation and behavior. They know how to achieve the perfect balance between challenge and mastery – too hard is off putting, too easy is uninvolving – and they build reward-driven experiences that capture attention.
Games are ultimately how we work out rules, and hence strategy.
All these things are essential components of learning, and indeed life.
A good game requires intense concentration, and this is where maximally efficient learning occurs, which contributes to better knowledge retention and skill development. And with a game this is almost an unintended consequence.