It's precisely so you can gauge their performance on the job without any risk to the employer.
So what's the issue here?
But companies are being needlessly pedantic about only wanting to hire "the best of the best" and nothing else will suffice as if they're all working on problems the scale of Google or Astra Zeneca.
Here's a recent article saying that "EU jobs crisis as employers say applicants don't have the right skills"[1].
Well then, train them or be more flexible since people can also learn and train themselves if you give them the chance. No candidate will have 100% math to the skills you want.
[1] https://www.euronews.com/business/2024/04/08/eu-jobs-crisis-...