Candidate just devoted significant portion of an entire day with no compensation in hopes to work for you, you basically say 'no' and give nothing back.. its using peoples labor for free and trashing them.
Interviewing candidates also isn't a free labor source (in event that 'homework' has some professional use, which it often could)
I once spent two hours on a test for a contract development company. I'm an accomplished senior developer and normally i would have told them to F off, but I was curious so i did it. I did pretty well on it, but never got a response. Zip, nada, nothing. I emailed them multiple times and even called HR. Still no response.
Anytime other devs ask me about that company, i say don't waste your time, they are super shitty.
Other than obviously or blatantly incompetent coding, I'd expect that as a minimum, a code review would be a part of the equation.
This is similar to you working on a project, your boss looking over it, not saying a word, dragging it to the Recycle Bin, and walking off.