It's cruel and inhuman, but if you're Google, there's some cold rationality behind this.
I think the process goes for them like this:
There's 100 people applying for any given position, 10 of which might be good hires.
It's reasonable from their point of view to subject the interviewees to a process that culls 83 bad ones, and 7 good ones so that only 10 people need to be interviewed by expensive on-staff engineers, even though it looks like madness from the outside.
The rationality doesn't reflect the reality of Google being unable to innovate and continually competing with itself. Will another engineer from the same cohort who knows the same trivia and has the same education be able to shake things up?
What happens to the 3 that get rejected, do they try again later and filter through? Or do they tire of the process, give up, and work for competitors?
It's definitely questionable whether the process retains many good engineers. That said, I suppose it works as long as it culls more bad engineers than good engineers.