But you're missing the bigger picture.
As a employer, interviews are massively disruptive and time consuming. For us over two interviews you'll speak to at least one manager, two or three developers and probably someone from the test team and or an analyst. All those people will read your CV, prepare questions, spend time interviewing you and then get together to discuss and make sure we've given you proper consideration and provide feedback. These are people who are generally relatively well paid and have other things they could be doing.
We'll read 3 (pre-screened) CVs for each first interview, 2 short first interviews for every second interview and probably 3 long (several hours) second interviews for each offer. So to get to one offer we'll have read 12 CVs, done 6 first interviews and 3 second interviews. I don't think we're abnormal - that's about typical for places I've worked (though I've heard of places who are far more demanding).
Much of that is done based on little evidence (usually a CV which may or may not be totally factual) and it's certainly not an indication that we want a candidate to work for us, merely that it might be something that could work out. Understanding whether it's more than that is why we're doing the interview.
My point is that we put a lot of time and effort (which has an associated cost) into seeing whether someone is a good candidate for us (and if we think this is a good job for them).
We don't ask for compensation for that time so why is it reasonable for a candidate to do so?
A candidate absolutely has the right to say that they aren't willing to submit to a particular interview process but I think asking for money to interview requires a very lopsided view of the process and, as a hiring manager, would have me pull the plug instantly.
From the employee perspective they may or may not actually be looking for a job, versus casually interested in all possibilities (like me). They also may or may not already have a job, in which case they'll have to take the day off to go through such an extensive interview, giving away work and potentially IP for free.
If I have a job and/or I'm not really desperate, then the cost of the interview may be greater to me than what I see as the potential gain. Especially when compared with the other possibilities out there. There are a lot of companies that will pay for any significant amount of time spent coding for an interview. Why would I waste my time with a company that doesn't value my time (esp. taking it off work), the work they're asking me to do, or potentially the IP I give them (e.g. if I come up with a new way of looking at a problem or a new solution they haven't thought of during the code interview).
A couple hours is a reasonable sacrifice, IMO, but may depend on each candidates situation. If I as asked to spend more than 2 hours coding, I would ask for compensation or turn down the interview.
If you're casually interested the aim shouldn't be to do a day long technical interview, it should be to establish what the real level of interest is and to either build that interest or establish that it's the wrong thing for you / us. Once we've done that we're either in a situation where you're keen on the role and we're looking at something where a day might be a good investment for you, or we've saved us both a day.
Making a significant time investment when one party isn't serious about the opportunity is the wrong thing to do for both company and candidate, and throwing money at the problem doesn't change that.
Ultimately I'd like to show you I value your time by not wasting it, rather than by paying for it if that makes sense?
Personally I don't think that a company will learn much more from 8 hours or more than they could learn in 3-4 hours tops though. I think it's overkill in most situations.
Assuming you've at least weeded out the many people that are a waste of time and money, then I think it's fair to pay anyone you bring in a reasonable rate for a couple hours of work.
Also, with most companies that contact me, I don't really know if I'm interested at all until I go in and talk to them. Don't presume that all candidates are interested in working there. It's hard to know until you know more about what they do, their processes, the culture, the type of people you will be working with and what the management is like.