If I was being given a code challenge/take-home, I'd be more inclined to do it if it came with payment. Even if it's trivial, like $200. That's a small price to pay in screening and it at least shows the company believes your time is valuable.
A lot of companies will reimburse you for travel and lodging where applicable during the interview stage. It's not a far stretch to think that they should do the same if they are having you do actual work on your own time, also during the interviewing process.