There are places nowadays with maybe 300 or 400 engineers getting applications from tens of thousands of people, its easier than ever to apply for a job, and you need to thin the number of prospective candidates down with some heuristic. Coding questions is one of those ways. It tests your logical reasoning ability, your ability to show command over some language, and ability to code.
Quite frankly I would prefer that vs some arbitrary resume screen based on what School I went to. I would love to talk to someone and learn about the job, and on the flipside I love talking to people about their motivations and seeing them tackle problems live. However, this is not realistic.
[1] https://williampietri.com/writing/2015/slightly-less-awful-h...
[2] e.g.: https://web.archive.org/web/20151005181908/http://www.codefo...