Here's the difference: Bletchley Park didn't have anything else. There were no programmers. There were no github repos. There wasn't anything, really. All kinds of proxy measures used to be used (for instance, I've heard there's a correlation between musical talent and programming ability).
Those measures were better than nothing, but not better than a good measure.
Edit, because I want to amplify on this a bit.
In the absence of any other measure, I'm willing to believe that someone who's good at brain teasers is somewhat more likely to be a good programmer than someone who isn't (though the correlation isn't going to be perfect, by any means).
The thing is that I can also believe that someone who's good at brain teasers is more likely to be a good surgeon or mechanic than someone who isn't.
Yet we don't use this type of question when we're interviewing surgeons or mechanics. Why not?