As I write this, the most complicated and expensive vehicle ever built is travelling at a speed of around 17,300 mph some 200 miles above the Earth, to which, all being well, it will make its final return in 10 days' time.

After 30 years, the space shuttle programme is to end and America currently has no plans for manned space flights.

That may be a disappointment to those with a keen interest in rockets and outer space (more than a million people turned out to watch Atlantis being launched from the Kennedy Space Center in Florida on Friday), but it may not bother the majority of the population. Despite its two catastrophic failures – the loss of Challenger on its launch in 1986 and of Columbia on re-entry in 2003 – the regularity of space shuttle missions has led many to feel rather jaded about astronauts. Now that several hundred people have been up there, space doesn’t seem like such a big deal.

What’s more, there’s the feeling that although there’s an awful lot of space, there’s not much up there. What, ask some folk, has space ever done for us? The American government spent $192 billion on the shuttle programme, and the Apollo programme which proceeded it cost $25bn, which is nearly as much at today’s prices. Yet quite a common perception is that the most useful things mankind has got out of all that expenditure are non-stick frying pans and a pen which can write upside down.

By the way, the claim frequently made that Nasa spent millions developing the space pen while cosmonauts took a pencil is a myth; the pen was independently developed by the Fisher company, and the Russians ordered them too, because pencil shavings are dangerous in zero gravity.

Still, it’s an awful lot of money, which plenty of people would argue could have been better spent on something else, such as feeding the poor. The same people argue that India has no business having a manned spaced programme while so many of its citizens remain in poverty.

It’s easy to have some sympathy with this view, but I don’t. On the contrary, I think that the American space programmes and, for that matter, the Russian ones, and now the Indian and Chinese, are perhaps the greatest monuments ever to human achievement and inventiveness.

Nor has it even been particularly expensive; $192bn sounds like quite a lot but, to put it into context, it’s around 5% of the unadjusted measure of Britain’s public sector net debt which, including the interventions in the financial sector, currently stands at $3,615bn or so. Think how much money we could have saved if we had planned ahead and sent Gordon Brown to the Moon.

But while Mr Brown may be a fiscal lunatic, his sentiments when he addressed Congress two years ago were right. “I grew up in the 1960s as America, led by President Kennedy, looked to the heavens and saw not the endless void of the unknown, but a new frontier to dare to discover and explore,” he said. (He reverted to his habitually making mistakes at the TUC conference the same year when he declared that Kennedy, rather than Nixon, had been president at the time of the Moon landings.)

The human capacity for exploration, discovery and understanding are what the Moon landings really demonstrated. To complain that there have not been as many practical, tangible benefits as might have been expected is to obscure the magnitude of that achievement. Subsequent ventures into space, such as the construction of the international space station and the launch of the Hubble space telescope, in both of which the space shuttle was instrumental, have correctly continued to concentrate on expanding our knowledge, rather than devising specific technologies of more widespread usefulness.

For while it is foolish to believe that technological solutions can always be found to solve particular problems, pinning your faith on the things which are the spur for creating those technologies – human ingenuity and the thirst for knowledge – is not only the wisest, but the only sensible course of action.

Like the Large Hadron Collider at CERN, the space programme was testament to our willingness to invest in the pursuit of knowledge for its own sake. Like CERN, where technology which was devised to increase our understanding of subatomic particles led to significant improvements in, for example, medical instruments, the space programme brought some practical benefits. But its primary purpose was to satisfy our curiosity about the universe, and its most productive benefit may have been to demonstrate what can be achieved through the power of human reasoning.

That curiosity and rationality are, of course, the two attributes which set Homo sapiens apart from other creatures and, if they are not to be the instrument of our destruction, as so many dystopian visions, from nuclear apocalypse to global warming, predict, they may be the means by which we avoid the ultimate fate of every other successful species in history. I mean, of course, extinction.

It may seem the stuff of science fiction – no, scratch that, it is the stuff of science fiction – to imagine that mankind will one day live on other planets, or on artificial habitats like the orbitals in Iain M Banks’s excellent Culture novels. But then, though prediction is not science fiction’s main purpose, quite a lot of things that the genre has predicted are now a reality, such as geosynchronous satellites and the internet. Some, such as mobile telephones (predicted by Ray Bradbury, amongst others) are so ubiquitous as to be invisible. Indeed, today’s smart phones have more computing power than was used to put men on the Moon.

But if we do not imagine living in space, the end of the human race is a certainty. Over the long term, some terminal catastrophe, such as an asteroid hitting the planet, is inevitable. Sooner or later, people will have to leave Earth or die out. The space programme is a reminder of how far the human race has come – and gone – in a remarkably short time. We will have to go back, and further, or we are doomed.