These types of interviews are very similar to the Confucian Imperial Examination tests (Keju) of China [0]. The Keju's main purpose was to exclude peasants while giving the imperial bureaucracy the image of a meritocracy and therefore legitimacy. They also helped enforce a common culture, script, and style of writing for the large empire. To be clear, the Keju changed a
lot as China's history evolved and it changed with China and is not a unified 'thing'.
The expense and time for study excluded many people and I have heard that whole villages would pool resources for just one son to buy the exam materials and take the time to study for the exam. Richer families didn't have need to sacrifice as such, of course. Typical success ratios were ~1:50 exam sitters. The Taiping rebellion was a direct result (among many) by such a man that failed his exams a few times (later declaring himself the brother of Jesus, but that's whole other story).
Though exam subjects changed over time, it typically included recitations of Confucian poetry, calligraphy, instrumental music, and other such gentlemanly subjects. You know, things you really need your bureaucrats to know to run an empire well.
Similarly with FAANGs (and previously with GMC/Ford/Chrysler, or in academia), the interview/exam is geared not towards the actual specifics of the job, but rather in the 'pruning' of the people and the appearance of legitimacy. They are selecting for people that will go through the hoops and the nonsense without questioning it and will make good bureaucrats (loyal, command-able, lacking vigor). Boat-rockers are selected out before they even start the irrelevant studying process.
[0]https://en.wikipedia.org/wiki/Imperial_examination