Even if Mars has never had life, comets and asteroids that have struck the planet should have scattered at least some organic molecules - though not produced by life - over its surface.
Some have suggested that organics were cleansed from the surface by naturally occurring, highly reactive chemicals such as hydrogen peroxide. Then last year, NASA's Phoenix lander, which also failed to detect organics on Mars, stumbled on something in the Martian soil that may have, in effect, been hiding the organics: a class of chemicals called perchlorates.
At low temperatures, perchlorates are relatively harmless. But when heated to hundreds of degrees Celsius they release a lot of oxygen, which tends to cause any nearby combustible material to burn. For that very reason, perchlorates are used in rocket propulsion.
The Phoenix and Viking landers looked for organic molecules by heating soil samples to similarly high temperatures to evaporate them and analyse them in gas form. When Douglas Ming of NASA's Johnson Space Center in Houston, Texas, and colleagues tried heating organics and perchlorates like this on Earth, the resulting combustion left no trace of organics behind.
Never underestimate the human ability to miss the glaringly obvious. One of the most interesting things about the history of science is the number of discoveries and breakthroughs that arrive decades or centuries later than they might have because the best and brightest couldn't see a solution that (in retrospect, once the problem has been solved) was right in front of them. Why do we figure some things out and not others?
(Note: I'm not saying I would have figured this out any faster than anyone else. But from my armchair perspective, it's fascinating that for 30+ years, it never occurred to anyone that such a reaction among compounds in the Martian soil might be skewing the results...)