I think most patents are silly, but isn't the system working exactly as it should here? The patent was awarded, then it was challenged in court and overturned for many of the reasons you cite.
If we were a lot more thorough about awarding patents wouldn't that increase the overall cost to society to exhaustively audit patents from the outset, instead of auditing only the small subset that's troublesome enough to be challenged in court?
Isn't that sorta like saying we should just prosecute everyone regardless of evidence, and let courts sift out the real problems? I doubt that's "exactly as it should" be.
The patent office is made out of experts which should have a much higher expertise in judging if an patent is valid than a judge. It make no sense to give the patent office the vast majority of "easy" patents, and then give the non-experts judges the issue of all the troublesome "hard" patents which has been challenged.
If we were a lot more thorough about awarding patents wouldn't that increase the overall cost to society to exhaustively audit patents from the outset, instead of auditing only the small subset that's troublesome enough to be challenged in court?