KSR stressed the need for common sense in obviousness analysis; it also mentioned that "obvious to try" can be considered.
An excellent summary of the case by a young and well-regarded patent law professor is at http://www.patentlyo.com/patent/2007/04/ksr_v_teleflex_.html.
Actually, section 101 of the patent statute expressly states that an invention must be useful in order to be patented. "Whoever invents or discovers any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof, may obtain a patent therefor, subject to the conditions and requirements of this title." (Emphasis added.)
There have been court cases in which patents were invalidated because their claimed subject matter had no discernible utility. See, e.g., the Janssen case: A patent claimed the use of a particular chemical formulation to treat Alzheimer's, but apparently there was zero evidence that the treatment actually had any effect. The case is summarized at http://www.pharmapatentsblog.com/2010/12/07/solving-utility-....
The Federal Circuit precedent on the issue used to be that you needed an explicit suggestion or motivation (in prior art) to combine two references or do further work, in order for that combination to be prior art, which was fairly ridiculous, but it was the law. See, for example, In Re Lee, 277 F.3d 1338 ( http://bulk.resource.org/courts.gov/c/F3/277/277.F3d.1338.00...). Some choice quotes (i'm too lazy to pull out the cites the opinion itself is making):
... There is also a still open question of the skill level of a person with ordinary skill in a given art and "obvious to try".As for bad ideas, nothing in the law prevents you patenting useless or non-valuable things. We do in fact, grant plenty of patents on useless or non-valuable things.
As for whether we should, I personally don't believe we should, but the argument goes that "plenty of things that people thought were useless or bad ideas at the time turned out to be quite commercially valuable".