AS A student of human nature, I often wonder why anyone goes on family holidays. I pondered the matter again recently, when we took the kids to southern Italy. Naturally, it rained almost every day. There were moments familiar to any parent, such as the deflating sound of an exhausted child waking up at 6.20am; the attempt to explain Pompeii to a three-year-old; or the evening we walked forever to the restaurant we'd read about, ordered food, then watched the children fall asleep before the meal arrived. Yet by the time easyJet landed us home, I think I'd figured out why people take family holidays - and, by extension, why they have families.

The "challenges" of family holidays are well known. It's hard enough getting on with your spouse and kids at home, let alone when cooped up with them for days. Susan Shaw, an expert on leisure at the University of Waterloo in Canada, thinks the term "family leisure" is problematic.

"Research suggests that such activities do not always live up to the leisure ideal," she writes, darkly. Brian Viner, in his Cream Teas, Traffic Jams and Sunburn: The Great British Holiday, describes one seaside holiday during which he shared a bedroom with his parents, it rained all week, he cut off clumps of his hair from boredom, his mother smacked him and then, as a finale, they heard on the car radio on the drive home that Robert Kennedy had been shot dead.

Family holidays probably don't add much to the sum of human happiness. However, as an economist friend likes to argue, people don't have children for happiness. It's a cliche of happiness research that parents are less happy than childless people. Rather, my friend says, having children is best understood as a biological urge. You have them not for the present, but for the future: to perpetuate your genes when you are gone. And likewise, you go on family holidays not for the present but for the future.

Families try to live up to the ideal of family life while struggling with an often disappointing reality. The aim, much of the time, is to stock up good memories: to leave all family members with snapshots of happiness they can look back on after the family ceases to exist. When the kids leave home, the family effectively dissolves, even in cases where the parents are still alive and together. That means parents have only just more than a decade to create happy memories: from the time the kids are about five, and have any memories at all, until they are in their late teens and heading for the exit. Family holidays are the parents' best shot at creating those memories.

Much of what we remember of our families comes from holidays. On holiday, the family exists more clearly than at any other time: all together for once, without work, school or friends. Because holidays distil the essence of family, they would be unbearable if they lasted more than a week or two. Indeed, even less can still be fatal - witness the number of Britons who check into mental hospitals after Christmas.

On holiday, you imbibe your family. The exotic setting imprints itself on the child's mind. All those holiday snaps reinforce the effect. In fact, the photos themselves are perhaps the main aim of the holiday: that's where the memories get laid down, and then rubbed in over the decades.

Louis Begley recently recalled his pre war childhood in the New York Review of Books. "At the core of my first memories of Poland," he wrote, "is a summer in the remote countryside where my grandparents had a small property." And he proceeded to describe that Polish summer in minute detail. Above the article is a photo of the child Begley beaming into the lens with behind him the adults over whom the wartime catastrophe was about to unfold.

A few decades from now, perhaps the main thing anyone will remember about me is my son's memory of my pushing him on the swings during a long-lost holiday in Sorrento. That's what you're doing it for: not for the children's happiness in Sorrento last week, but for their memories. Your children's memories give meaning to the otherwise day-to-day of your own life. If nobody remembered us, a philosopher friend once explained, much of the point would be gone.

A family holiday is for memories. Once you've grasped that, it's just a matter of enduring it. I vividly remember, about 30 years ago, returning from an Italian vacation to our handsome house with the fir tree in front. As we opened the gate, my mother said: "That's the best part of a holiday: coming home." At the time I didn't know what she meant.

© 2012 The Financial Times Limited