In the US, it's officially illegal for companies to discriminate based on intelligence, thanks to Griggs v. Duke Power.
https://www.theamericanconservative.com/overturn-griggs-v-du...