That's why I think you already do see it with one large category of tech job-seekers where that isn't a problem: students. Tech companies hire student interns for a summer effectively as a trial period, and both sides often like that arrangement.
Once I was given a much smaller, unpaid task as part of the interview process. It wasn't a puzzle or trick, but something actually useful. All told it took me a couple of hours one evening. You might be thinking, "How much can you learn about someone from such a small task?" It depends on the task, of course. Mine was typical network code, with a couple of non-obvious but absolutely real-world edge cases. I spent time making sure my comments were great, and then wrote a man page. I think they learned some important things about me, and on my end it was an easily paid investment.
One thing we noticed was that there is small handful of mistakes that many candidates tend to make. The ones that note the existence of a mistake or work around them skillfully are typically the best.
It is tough firing people. But that doesn't mean it can be avoided.
And this is a good time to remind everyone: Firing an employee doesn't mean the employee failed. It means that everyone (including the company and everyone else involved) also failed. Such a failure in an organization should be a time of reflection for everyone; to think about and talk about what worked, what didn't, and what everyone can do better next time.
To do something small, you don't need to quit a job, just dedicate few evenings and weekends and earn some extra cash.
This method can be beneficial for candidates, that can get to know potential employers much better, and avoid ones that look interesting only on job ads.
Fact is, you have to do everything up to that 'mini project' then just go with your gut and hire/no hire. If they underperform in the role you need to either change the role, try and train them up or let them go.
This trial period is just a way of pushing the risk of a bad hiring decision back onto the candidate and allowing the manager to avoid the discomfort of actually firing someone (although telling the candidate that the project didn't work out is functionally the same thing).