Do you truly believe that all those top tech companies have decided on this process to boost the egos of the interviewers? Are you saying this because you have actual evidence? Have you talked to interviewers who admitted this was their personal motivation?
I assure you that the purpose of these questions is to identify good engineers. You might think it fails to do so, but that is the purpose.