Of course they know that writing code on a whiteboard under stress isn't the same thing as sitting at a desk grinding out code. The problem is that it's pretty hard to sit down all the applicants for a position for a few weeks and work with them long enough to actually get a sense of how they work, and it's quite wasteful for the 95% who don't get the job.
Some companies actually do this, eg. Coinbase requires that you take a week off from work and work with them (I think unpaid, but perhaps you get contractor wages) on a project. They've been widely criticized as exploitative here, with many people saying "Why should anyone who has any choice at all agree to that?" They also open up a rats nest of legal & IP issues.
The best way to get a full-time position at Google - or most companies, really - is to get an intern or contractor position and then convert to FTE at the end. Hiring rates are way higher for successful interns (and the interview process is shorter), because they have lots of people inside with first-hand experience grinding out code with them that goes directly into Google's systems. But getting that internship or contract itself often requires an interview...
Some companies actually do this, eg. Coinbase requires that you take a week off from work and work with them (I think unpaid, but perhaps you get contractor wages) on a project. They've been widely criticized as exploitative here, with many people saying "Why should anyone who has any choice at all agree to that?" They also open up a rats nest of legal & IP issues.
The best way to get a full-time position at Google - or most companies, really - is to get an intern or contractor position and then convert to FTE at the end. Hiring rates are way higher for successful interns (and the interview process is shorter), because they have lots of people inside with first-hand experience grinding out code with them that goes directly into Google's systems. But getting that internship or contract itself often requires an interview...