> Doing well on this activity is probably highly correlated with having a high IQ.
Most possibly. That claim can be made stronger if you had a source to eliminate any doubt of that.
> However, this is not how people work in practice and so the work may not need such a high IQ.
There you go.
Whenever the interviewer asks anyone to do the algorithms challenges and puzzles, there is a very high chance that they do not use it in practice and they just Google'd interview questions on the spot.
In reality of their own work, they themselves are googling, copy-and-pasting, using StackOverflow, GitHub issues and ChatGPT'ing their way to 'solving problems'.
So to your great question:
> So why are such technical interviews legal in the US if IQ tests are not?
The reason is, almost everyone thinks they are a 'Tech / AI company' like Google but doesn't know what they are looking for and they mimic what Google does. Hence the pseudo-IQ test / interview questions loophole.