Almost four decades ago Gould and Lewontin published a seminal paper on evolution , criticizing the panadaptionist view. This is unfortunately a common mistake, assuming that each and every trait an organism displays (including its behaviour – evolutionary psychologists are serial offenders in this regard) has been optimally "selected" by the environment. The picture, they argue convincingly, is much more complicated, and the basic mistake here is the assumption that natural selection operates on the gene level, whereas it is the ensemble of the organism that is suffering evolutionary pressures. Certain traits just go along for the ride, for instance, due to being in proximal regions of the genome to areas related to other phenotypical characteristics that are the ones effectively being selected.
The fact that the criticism was made long ago, however, does not mean that its target has ceased to exist. Every now and then examples of this misapprehension pop up – especially among the semi-scientific literate. PZ Myers narrates a recent example in a blog post: The seductive nature of selection. "Note that I’m not against selection — it really is an important and powerful component of evolutionary theory. Perhaps too powerful, conceptually; there are a lot of people who are rightfully thrilled with the idea, and start thinking everything is a product of selection, down to the last detail, and then they think the science is a matter of just filling in the gaps with your imagination. One subject that always brings omniadaptationists up short is homosexuality. I think it might literally short-circuit their brains". It’s an informative and entertaining reading. Probably not so much for the guy who kept asking silly questions, though.
 Gould, Stephen Jay, and Richard C. Lewontin. "The spandrels of San Marco and the Panglossian paradigm: a critique of the adaptationist programme."Proceedings of the Royal Society of London B: Biological Sciences 205.1161 (1979): 581-598.