What the heck is NASA for? It’s like asking what a panda is for.

We adore pandas, but they’re evolutionary train wrecks. Look at the skull of a panda and you see the vicious teeth of a carnivore. Yet it gnaws on bamboo. The panda’s jaw and its gut are totally unsuited to grind and digest a woody grass, and as a consequence, it spends most of the day just trying to cram enough bamboo in its face to stay alive. Countless years ago, the panda’s ancestors attempted to get an advantage over its competitors by settling on an oddly specific diet that nobody else could stomach. While the choice gave the panda a short-term advantage (the pandas never had to fight for their bamboo supper), it turned out to be a poor choice in the long term. In short, the panda overspecialized, and ever since then, it’s been trying to survive. NASA is the panda of the U.S. government: a great big cuddly maladapted agency that’s beloved by almost everyone—and that is flirting with extinction.

NASA was formed in 1958, in response to Sputnik’s Russian-accented beep-beep-beep circling over our heads, to challenge the Soviet juggernaut, the Communist machine that was thumbing its nose at us from orbit. A little more than a decade later, in July 1969, NASA astronauts left their boot prints on the lunar regolith. Mission accomplished. The space race was over. America had won.

NASA had captured the public’s imagination by putting men on the moon, one of the pinnacles of human achievement. But after the climax, the government immediately lost interest in getting its rockets off to the moon again. Less than half a year after Apollo 11, NASA began canceling Apollo missions. Apollo 20 was first to go, and as the agency’s budget detumesced, two others soon followed. (Nixon reportedly considered canceling even more.) The moon race was history. On to the next act.

But what to do next? The moon race was a story that had everything. It had the raw appeal of base nationalism, but it was made noble by the dressings of scientific achievement. (“Rocket scientist” had become the colloquial ne plus ultra of braininess.) And it was a great human story too, complete with square-jawed and buzz-cut heroes determined to achieve glory or die with “ad astra” on their lips. NASA had built its reputation on a fortuitous combination of accomplishing lofty national ambitions and generating a huge pile of scientific and technological achievements, all resting on the backs of the heroes in the astronaut corps.

Sadly, the rest of NASA’s history can essentially be boiled down to trying (and failing) to figure out a mission that could once again capture all three of these drives simultaneously: national ambition, science, and human interest. Having achieved the moon, there was nowhere left to go. And without a central mission, without a grand goal, NASA was an agency without any real purpose, an animal without an ecological niche.

A Mars mission, of course, would be a spectacular achievement, but it’s nearly as financially and technologically infeasible today as it was in 1972. With humans aboard, that is. With living passengers out of the equation, not just Mars but the whole the solar system is wide open. Starting in the early 1970s, we started sending robots to the red planet and beyond. NASA has a knack for lofting exquisitely beautiful machines that give us a treasure trove of planetary science, but the agency soon discovered that the Pioneers and the Vikings and the Voyagers didn’t capture the imagination of the public (or of Congress) the way that manned missions with their stony-faced pilots did. Human spacefarers, not robotic ones, tap into something visceral. As earthbound explorers tamed the last unknown and wild spaces on our planet, NASA’s astronautic adventures gave us a vision of a fresh new frontier ready to receive our manifest destiny. As space policy analyst Howard McCurdy put it, human spaceflight “satisfies the apparent human need for human migration. It promotes the utopian belief that life will be better in newly created settlements beyond the reach of the ‘old world.’ ” Machines don’t seem to satisfy that primal drive. Never mind that robotic eyes have gazed upon the methane shores of Titan’s seas or that robotic ears and noses have plunged into the Jovian atmosphere and heard its lightning and smelled its ammonia tang. Some folks appreciate this kind of science, but as far as the general public goes, without humans aboard, merely sending a spacecraft to another world barely counts as exploration at all.

Unfortunately, the moment that you stick a human on a spacecraft, it makes the endeavor incredibly expensive. It costs too much to send an astronaut anywhere interesting; all they can do, without a major increase in NASA funding, is futz around in Earth orbit. And with NASA’s post-Apollo levels of funding, it couldn’t even do Earth orbit very well. Early plans to have a set of space stations along with a transportation system to get astronauts and supplies into space and back quickly fell apart. NASA budgets could barely support either a station or a transportation system—the space shuttle program—but it couldn’t do both at the same time. (Never mind that having one without the other makes little sense.)

Worse yet, putting a human on a spacecraft pretty much guarantees that there won’t be any worthwhile science coming from the project. Compared to robots, humans are sloppy, slow, and error-prone. With a rare exception or two, the experiments run on board the International Space Station, and before it, Shuttle-Mir, were of sufficient quality to win a medal at a high school science fair but fell far short of the “world class” research that space-station aficionados like to conjure.

Look through the list of experiments run on Shuttle-Mir or on the ISS and you’ll see that most of them are published in third- or fourth-tier journals, if they’re published at all. Compare that to the mountains of seminal publications (not to mention a Nobel Prize or two) coming from unmanned spacecraft, and the difference is stark. If you factor in cost, the comparison becomes outrageous.

The ISS cost upward of $100 billion and probably more than $200 billion—so huge that I’m not sure anyone has a valid accounting. (For comparison, sequencing the entire human genome for the first time cost less than $3 billion.) Each shuttle flight alone, and there were 135 in all, cost more than $400 million. At that price, it’s hard to imagine an experiment important enough to make the endeavor (and Endeavour) worthwhile. Even the most important scientific contribution by the shuttle turns out to be a loser, cost-benefit wise. When shuttle supporters mention that the shuttle’s five missions to repair and refit the Hubble Space Telescopes were good for science, they neglect to mention that it would have been an even bigger boon to scrub those five missions and buy two brand-new billion-dollar Hubbles with the savings.

Factor in the danger, and human spaceflight becomes almost impossible to justify. NASA kills roughly 4 percent of the people it launches into space. It’s a very risky thing to pack enough energy into a vessel so that it can spin around the Earth at 5 miles a second. It’s just as difficult to bleed that energy off and come to rest on the ground without burning up in the process or winding up as a sizeable crater. Some of the time, the process will go awry. Even if NASA’s managers, engineers, and technicians were perfectly on their game all the time, astronauts would still die—maybe just 1 percent of them rather than 4 percent, but die they will, at an alarming rate. In vain.

Shortly after Columbia broke up high above the Texas prairie, disaster crews recovered a hard drive that, almost miraculously, was practically intact. Scientists recovered the drive’s information and discovered that it was the data from one of the experiments. One of the last acts of an astronaut was to gather this data and record it so that a scientist back on Earth could analyze it and publish it. The publication that resulted was cited a grand total of three times. The hard drive might as well have burned up in the atmosphere.

Columbia and its crew perished not for science—and not to fuel national ambitions or even human interest. How many post-Apollo astronauts can you name? Maybe one or two—the ones that might have piqued your interest in some way, such as Sally Ride, the first American woman in space. But generally, NASA missions were dry, uninspiring affairs with nothing to look forward to and nobody in particular to care about.

NASA was stuck without a niche. Robot missions did great science, but they didn’t satisfy our primal need for space manifest destiny. Human missions did awful science, and they didn’t satisfy our primal need for space manifest destiny. How could the agency justify its budget?

NASA tried lying, making its scientific efforts look much more significant than they really were. For example, one of the major justifications for the ISS was that astronauts would be able to grow large protein crystals in space, which would revolutionize biology. They even went so far to say that space crystals gave us a flu drug. Nonsense, said a number of scientific bodies that knew better, such as the American Society for Cell Biology and the National Research Council. (Admittedly, they said it politely. The NRC report, for example, said: “The improvements in crystal quality that have been observed are often only incremental, and the difficulty of producing the appropriate controls limit investigators’ ability to definitively assess if improvements can be reliably credited to the microgravity environment.”) And that flu drug? The crystal was grown in Australia, which, while not in space, at least had its gravity pointing in a novel direction.

To keep Congress happy, NASA relied on pork-barrel politics and even lofted a few bacon makers into space. Florida’s Sen. Bill Nelson reportedly did better than Utah Sen. Jake Garn, whose zero-gravity antics earned him the nickname “Barfin’ Jake.” Of course, NASA was careful to wrap even the most crassly political stunt—such as the shuttle flight of Ohio Sen. John Glenn—in the mantle of science. (Never mind that he wasn’t eligible to participate in the “scientific” study he was supposed to take part in.) But the essential problem remained. Human spaceflight was all but worthless for generating science or public excitement, and unmanned craft didn’t fill the void. So NASA began to hope for a miracle.

That miracle is extraterrestrial life. If we found creatures from outer space, even microbial ones, it would radically increase our knowledge about the origins of life and create a whole new branch of science. It would also mean dozens of new NASA-style space missions to learn more about the wee beasties. Alien creatures would give NASA a sense of purpose once again. And in 1996, a space rock looked like it would take NASA to the promised land.

The first public hints came from a hooker. She had the details wrong—she told the tabloids that the aliens were from Pluto—but as crazy as it sounds, she was essentially correct. Within the week, NASA would announce that scientists had found life on Mars. Here was a piece of news that even the most addled of politicos—Clinton strategist Dick Morris—knew was sufficiently important to impress a prostitute. NASA had its sights set on bigger targets. By claiming that a recovered Martian meteorite contained tiny fossils of “nannobacteria”—little wiggly bodies too small to be Earthly microbes—NASA was able to get the attention of the president himself. “I am determined that the American space program will put its full intellectual power and technological prowess behind the search for further evidence of life on Mars,” President Bill Clinton said on the South Lawn.

Too bad it was bunkum.

Within days, astute scientists started poking holes in the Mars-life story; within a few years, it had been cast aside as wishful thinking by pretty much everybody except the original NASA scientists. As late as 2009, NASA updated the public about “new” evidence for fossil life in the Mars meteorite. (NASA’s website coyly states that “there is not an official NASA position” about the Mars rock.) Worse, the Mars meteorite story wasn’t the last time that NASA seemed willing to promote bad science while trying to bolster the “astrobiology” niche it’s trying to create for itself. In 2010, history repeated itself as farce when NASA astrobiologists discovered a “new” form of life that could use arsenic instead of phosphorus in its DNA—something no known organism was able to do. Naturally, this, too, was fantasy. And although arsenic-based life wasn’t as public a failure as the Mars meteorite story, it was an even more colossal screw-up, scientifically, the product of sloppy lab work and poor oversight.

This isn’t to say that all of NASA’s research is worthless. Far from it. But NASA’s need to find a justification for its existence has damaged its integrity. The agency reeks of desperation as it gropes for some rationale for human spaceflight beyond the weirdly circular we-need-to-put-humans-in-space-to-study-what-happens-to-humans-when-we-put-them-in-space logic it’s used for the past four decades. As NASA attempts to peg its future to will-o-the-wisp projects to the moon, to Mars, to a local asteroid, each of which has a less-than-even odds chance of coming to fruition, NASA’s science slowly deteriorates.

NASA must adapt or die. In days gone by, it made sense to have a government agency spend untold billions to shoot people into space for God and glory. But those days have long since passed, and NASA’s continued willingness to let the costs of human spaceflight devour the money that it should be using to do what it does really well—remote science—guarantees that it is headed for extinction. Admittedly, scrapping (or at least drastically curtailing) human spaceflight would be risky. The move likely wouldn’t be popular with the public, and Congress is surprisingly stingy when it comes to funding scientific projects that don’t produce something weaponizable. But refusing to adapt to a changed environment means that NASA, like the panda, will eke out a harder and harder living as conditions continue to worsen, spending an increasing amount of its time merely trying to survive. It will just be biding its time until extinction.