This is common in a field like journalism. Want to do a one or two day trial of a reporter? Pay them to write for you! Have them work in a real environment and do real work for publication.
If you're not willing to pay people for their time, and it's not an executive position, asking for days of a person's time is asinine. Also, if the homework isn't really real world, I still don't think it's of value. Making interview processes longer doesn't make them more rigorous. Only rigor makes a process more rigorous.
What I tend to do is have people do contract work for me, and if they do good work and people like working with them, I'll offer them a full-time position. Another way that companies get at this is with internships. They are a low-cost way to scout talent.
I find that a lot of companies are mistaking theater for rigor. If you ask someone to do a coding assignment, and it's not the kind of work that your company would actually do, how much value do you get out of it? Can someone work with your APIs? Are they comfortable with your languages and systems?
I have also found that longer interview processes that have more people involved introduce noise, not rigor. This is why I generally try to be involved in the entire interview process for people I am hiring.
Want to work on my team? I'll screen the resumes, I'll do the phone interviews and then I'll bring you in in person. I'll be in on all of the interviews you have with various people. It's my job to hire great people to work for me -- not recruiters, HR or random people at the company. I involve HR at the end to get a sense for a person's personality, not at the beginning.
As a manager, hiring is arguably my most important skill. A manager that can't hire is going to have trouble building a good team that works well together. So, getting the hiring process right is critical.