I mean, they could just as easily hire a bad candidate that happened to cram that specific interview knowledge the day before but is otherwise a bad developer.

Personally I don’t agree with the crazy tech interviews at all, no other job on the planet does it like this, even high skill jobs like doctors or professors. They hire based on your experience, your references, and a good chat to make sure you’d be a culture fit. If there’s a serious problem with a doctor once they start the job, they’d be let go, but they’re professionals so this isn’t a super common occurrence.

The exact same process could be taken with developers IMO. If I have a seasoned career, you should hire me based on that, not because I jumped through hoops you set up.