A quick shout-out to the US Patent Examiners - these individuals have technical degrees just like us, and do their best to weed out the crap patents they can. In fact, they are judged (for better or worse) by the number of patents they successfully reject.
They are also now some very overworked individuals. They have only hours to review patents in a diverse set of topics. There is only so much research they can do - a patent written by a master claims writer, no matter how frivolous, is very difficult to reject outright.
If you want to improve patents in the US, you can start by asking your congressperson to increase funding to the USPTO.