As much as I hate queues at the airport, I believe that TSA and Co. are effective. Sure, they cannot catch anyone but people demonstrating that in tests tend to be much more knowledgeable than would-be attackers. Just knowing that you could get caught is enough to put off many. There's a reason why the terrorist attacks we've seen in recent years (especially in Europe) have been largely focused on vehicles , trying to blow up a plane has become much more risky with TSA.
So I don't think it's mainly window-dressing. It's not perfect but enough to scare off most bad guys.