If, after talking through it with someone, I still feel like there is a good chance of a mutual fit, then I'm happy to be evaluated quantitatively by my skills. But if a simple conversation reveals that it's not a good fit, then it saves everyone a lot of time since I can avoid the code test for a position I don't want, and the company doesn't waste time evaluating a code test for a candidate who will end up feeling that the role isn't the right fit.
This is just my personal feeling, but for me the idea of doing a code test before ever talking to someone at the company about the nature of the job is like putting your shoes on before you put your socks on.