You wouldn't ask a carpenter to make you a closet before you decide if you want to hire them, you look at the other houses they've created (at least, you should. There's a lot of crappy carpenters out there, and it feels like I've worked with them all). You don't ask your mechanic to change your oil for free, and then MAYBE you'll let them fix your car. So why is this just the status quo for software developers now? I have a job and family, why the hell would I want to spend my free time jumping through hoops for you when you could easily look at all the work I've already done?
I dunno, just my $0.02. I've been asked to do a lot of dumb programming challenges before job interviews, and I'm over it. I'm a professional and my time is valuable, why would I want to waste it figuring out how many ways you can turn a string of numbers into math problems?
/rant. Whew.