The logic is that the TSA doesn't 'know' the person in front of them is, actually, a pilot. He's just *dressed* like a pilot. If the TSA waves through pilots, then the bad guys will just pretend to be pilots.
See 'Catch Me If You Can'.
So, not *completely* stupid. The completely stupid part is taking toenail clippers away from anyone at all.