Patents can and often are invalidated for the patentee's failure to include prior art; in fact, it is the leading cause of patent invalidation.
The problem is that the USPTO doesn't have the number of employees it needs to examine each patent, as fully as would be necessary to stop "obvious" patents from getting through, within a time frame for allowing meaningful inventions to hit the market in a timely fashion.