There was, not very long ago, a peculiar and now almost antiquated affliction of childhood called boredom, which descended indiscriminately upon rainy afternoons, long railway journeys, visits to elderly relatives, hours after school and those interminable stretches of summer in which every toy had been played with, every quarrel with a sibling exhausted, every corner of the garden inspected and found wanting, and the unfortunate child, having announced for perhaps the sixth time that there was nothing to do, was very often met not with the immediate production of entertainment but with that singularly unhelpful injunction to go and find something. And so he did. He found books, invented kingdoms beneath dining tables, conducted conversations between dolls, stared out of windows, pulled things apart which ought perhaps to have been left intact, and, having been denied amusement prepared and packaged for him by somebody else, was obliged eventually to call upon that strange, unruly little faculty of his own mind which we call imagination.

The modern child is rarely permitted to become so desperate. There is always something.

A screen may be slipped into a pair of small, impatient hands before impatience has properly had time to establish itself; a bright little world springs immediately into being, full of movement and music and colour, where characters chatter without requiring replies, adventures commence without requiring invention, and one delight follows another with such breathless punctuality that no empty moment need ever intrude between them. If one video fails to please, another awaits the flick of a finger; if a game becomes difficult, some other game is ready to confer its brighter and more immediate rewards; if the child grows restless during dinner, in the car, in a waiting room, in a shop, at a family gathering, the small glowing rectangle may be summoned like an extraordinarily efficient governess whose chief virtue is that she never tires, never loses patience, and never requires a day off.

It is tempting, particularly for those of us who love books, to turn this into one of those familiar lamentations in which all modern inventions are treated as evidence that civilisation has taken a wrong turning somewhere after 1997, and children must therefore be rescued from technology and returned, preferably at once, to wooden toys, muddy knees and illustrated editions of The Wind in the Willows. But the screen is not some wicked enchantress who has crept into the nursery to steal the souls of children while their parents were otherwise occupied. It is useful; it is often educational; it can be beautiful, ingenious and enormously entertaining, and any parent who has attempted to complete an urgent task while a small child demands the entire resources of the human heart will know that its usefulness occasionally borders upon the miraculous. The trouble is not that screens exist, nor even that children enjoy them. The trouble begins when they become so extraordinarily good at supplying the imagination with everything it might desire that the imagination is scarcely called upon to supply anything for itself.

A story is a less obliging creature. It does not arrive fully furnished. It gives a child a forest, perhaps, but does not place every leaf upon every tree; it offers a house but leaves certain rooms in darkness; it introduces a girl with red hair, an old man with a crooked back, a rabbit in a waistcoat, a garden behind a locked door, but something remains unfinished, something remains uncertain, and into that little unoccupied space the child must enter and complete the work himself. He must decide what sort of red the hair is, how the old man's voice sounds when he is angry, whether the garden smells of roses or wet earth, how high the trees grow and what exactly lies beyond them. Even the most richly illustrated book cannot quite close every door upon him. There are always spaces between the words, and in those spaces the imagination wanders freely.

And it is not merely imagination which is being exercised, though imagination alone would be reason enough to preserve the habit of reading. A child who gives himself to a story must remember; he must wait; he must wonder. He must carry the knowledge of one chapter into another and retain some small detail whose importance may not reveal itself for twenty pages; he must meet a character, dislike him, discover something unexpected about him and perhaps, rather inconveniently, find himself obliged to alter his opinion. He must suffer suspense without being able to swipe it away. He must endure not knowing. He must occasionally read several pages in which nobody explodes, dances, sings, transforms into anything, wins a prize or shouts for his attention, and nevertheless continue.

This seems such a small accomplishment until one remembers how increasingly reluctant the world itself is to leave anything unattended long enough for us to become curious about it.

For stories possess another and still stranger power, one which children themselves are perhaps the least likely to notice while it is taking place: they permit a child, safely and secretly, to live for a little while inside lives which are not his own. A lonely child may enter the mind of another lonely child; a fortunate one may encounter hunger, grief or fear without first having to suffer them; a timid child may accompany somebody brave, and a confident one may discover what the world looks like to somebody frightened. He may love a person he would never have met, forgive one whom he had first condemned, mourn somebody who has never lived at all, and feel genuine indignation over an injustice committed in a world manufactured entirely from ink and paper. None of this announces itself as moral education. That is perhaps why it succeeds so well.

No child reaches eagerly for The Secret Garden because he has resolved to improve his understanding of grief, emotional neglect and human companionship; no seven-year-old asks for a fairy tale because she wishes to conduct an examination of courage, jealousy, cruelty or justice. She wants to know what is in the tower. She wants to know whether the witch will win. She wants to know what happens next. And while she is finding out, almost without her consent, she is being acquainted with fear and tenderness, selfishness and sacrifice, foolishness and wisdom, and that very inconvenient truth which adulthood will spend years teaching her again and again: that people are very seldom only one thing.

There is something wonderfully intimate about this transaction between a child and a story, because the story does not merely perform before him; it asks something of him. His attention. His memory. His sympathy. His patience. His willingness to remain.

And remaining has become difficult. We live in an age which has perfected the art of capturing attention while becoming curiously indifferent to the art of keeping it. Everything sparkles at the edges. Something is always beginning, appearing, ringing, flashing, recommending itself, promising to be quicker, shorter, brighter, easier; and if adults, with all their supposedly mature powers of judgement, find themselves opening their phones to answer a message and emerging twenty minutes later with no recollection of how they came to be watching a stranger reorganise a refrigerator, it seems a little unreasonable to imagine that children will develop powers of concentration entirely by instinct.

Stories teach a different rhythm. They unfold. They withhold. They make promises and sometimes take an unconscionably long time to fulfil them. They introduce things whose significance cannot yet be understood and ask the reader to trust that understanding will come. In a world increasingly arranged around immediacy, this is almost a radical education: the discovery that not everything worth having must reveal its worth instantly.

And perhaps this is why the defence of children's stories ought never to become merely a defence of books against screens, for that quarrel is too simple, and simplicity would do an injustice to both. Children may watch films and read novels, play games and listen to fairy tales, learn from an app in the morning and disappear into Narnia in the afternoon; one pleasure need not be murdered to make room for another. What matters is that we do not, in our understandable desire to keep children occupied, entertained and happy, accidentally deprive them of those quieter pleasures which demand rather than seize attention, which leave something unfinished for the mind to finish, which allow boredom occasionally to knock at the door and remain there long enough for imagination to answer it.

For a child who has never been bored may never learn what his own mind can do with emptiness; a child who is never made to wait for a story may never discover the peculiar sweetness of anticipation; and a child to whom every castle has been shown, every monster drawn, every voice supplied and every silence filled may inherit a world more dazzling than any childhood before his own, and yet lose something immeasurably precious in exchange: the ability to close his eyes before an empty page and see a whole world waiting there.