Nobody is going to pay candidates for their time during the hiring process. And honestly nor should they. You are not doing work for the company when you do some test to demonstrate your skill.
I'm not in favor of take home "go write this thing" projects, but what you're suggesting isn't a viable answer at all.
Whether they should or should not pay candidates is a matter of negotiation, not a law of nature. You don’t need to argue the company’s perspective for them, they will do it.
From the company’s perspective, they are indeed getting value from the homework assignment: an opportunity to evaluate a potential hire. If that seems weird, consider why any company would pay to post a job opening. The price they are willing to pay has nothing to do with the marginal cost of displaying the ad.
> Nobody is going to pay candidates for their time during the hiring process.
Not if they don't ask. If you asked, you'd find many who are willing.
> You are not doing work for the company when you do some test to demonstrate your skill.
You literally are, it's just not work from which they are likely make a profit. That is not the candidate's problem. This doesn't make it unreasonable for the candidate to ask for compensation.
I'm not in favor of take home "go write this thing" projects, but what you're suggesting isn't a viable answer at all.