The problem is the sheer number of steps required, of which the project is just one step. For example for a recent position I looked at:
1. Initial interview with some HR person: 1 hour
2. Interview with a tech person and review some code sample (spot security issues, bugs etc): 1.5 hours
3. Take home project (supposed to take 2 hours, but you'll want to make it look good so you'll probably spend twice that): 4 hours
4. Another in-depth interview with a couple other tech people: 2 hours
5. Another interview with the CTO: 30 mins
6. References & background check.
That's not atypical. Round after round of interviews. It becomes an endurance test, where only the most dedicated will stay the distance. While the 8-10 hours might not seem much stretched out over several days, you want to add some prep, keep your calendar clear so it does eat up your spare time, especially if you are already working.
And that's just one job. What if you are interviewing at multiple companies?
Note the take-home is at the start of the process, not the end: so you can end up putting a lot of effort in before you have even cleared four or five other hurdles. Oh, and I don't even have an offer yet. It could well be the offer on the table isn't worth my time.
Now you could say "well, we only want dedicated people". Fine, but I'm dedicated in so far as I get paid to be working for you. I don't get paid to run your interview gauntlet. Maybe you want people willing to do free overtime?
And this is way more than it used to be maybe 10 years ago, and it's for small to medium sized companies, not FAANG or other big corps. Nor is it a feature of recent layoffs and resulting increase in the talent pool: this has been the case for a few years now.
I think there's a few factors at work:
- Endurance test
- Risk aversion culture in management
- Copypasta whatever Google or Apple do
FWIW, last time I interviewed at Google, there was no take home test, so I don't know where people are copying that from but I don't think it's Google.
This very much depends on what type of IP agreement you have with your current employer.
It doesn’t make sense for a company to open up their code base and infrastructure to random candidates and ask them to work on it. That’s an IP and leak nightmare.
OTOH, if you are taking a paid contract job to work with a company on real work as a trial, you could definitely be violating contractual agreements with an employer. This type of interviewing is extremely rare, though. Few full time job holders would consider it, so it would be largely limited to unemployed people who have the time to do it.
Hiring is a matching process. If a company with an annoying hiring process is a bad match for you, that's fine.
Remember, the company has more information than the applicant.
(This question is asked in good faith).