I want to be clear that by "the standard whiteboard interview" I mean a certain format that's been roughly standardized at FAANG and copied out-of-context by a major chunk of the industry. It's a starter question, then a harder question, then another if there's time; each is answered with an algorithm written on the board in mostly-valid code. Your on-site loop (pre-2020) is four to six 1-hour sessions back to back, plus a lunch break.
The only work environment it simulates is one where every feature is developed in a 15 minute sprint that's literally overseen (like over your shoulder) by a boss who's put you on a PIP; there's no collaboration and no google; nothing is expected or allowed from you except a working output; and you're fired if there's any issue raised in code review.
It's more like an exam, but it's not even that: exams are meant to see what you know. The whiteboard interview just offers you as many ways to fail as possible and sees if you make it.
I wouldn't really say it's either one. I hesitate to call it hazing, but... as a trial to prove your dedication to the group by doing arbitrary and unpleasant things, for some it feels similar.