You also get pretty high resolution data about how your applicant performed (like their intermediate submissions, editing history etc) and how their solution performs compared to other applicants.
So all of that comparative info on a less directly relevant test can actually be more useful than n=2 or 3 on a direct proxy of your actual job.
Also I disagree with the premise that these exercises don’t carry over. The ability to puzzle through an algorithm you haven’t seen before in under an hour is directly useful and a common task in any domain that is algorithmically complex and not just gluing CRUD frameworks together (and even that gets complex once the scale is big enough)