It depends on the type of 'test'.
If it's an automated test scored by a machine that can't tell maintainable code from spaghetti, testing knowledge of algorithms with no relevance to the job or project you are going to be working on then yes, I can see your point.
But if the challenge is well constructed, involves solving a problem you might encounter during your day job, is reviewed by a human (or humans) and assesses problem solving skills, code quality, maintainability, solution design and things such as whether the developer wrote tests - and most importantly the developer receives feedback after the review (as opposed to a binary pass / fail) the I think they have a place in the hiring process.
The reality is you are never going to hire someone without assessing their skills, code challenges offer candidates the opportunity to show off their skills in the comfort of their home, without the need to attend hours of interviews, scribbling all over shite boards and being grilled by a room full of engineers who would rather be working on shipping their current project.
Yes - I am biased :) But I do think they have a place, IF they are well constructed.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.