You worked hard but the rich kid next to you in class paid someone to do their homework and steal test keys and maybe even bribed a professor or two. Companies need to filter them out.
Or you can ask them to code up some algorithms. The companies paying the best choose to do this, and they grew and became much larger than the companies that didn't do it this way, so now most companies do it this way.