Just a guess, but maybe they use AI to compare the live person’s face to the photo on the ID to verify. Of course if they’re comparing to the printed photo and not to a database photo linked to the ID, then the whole purpose of the machine is ill-conceived, as it could be bypassed with a fake ID.
Yeah, I also hate back-button hijacking. I suspect some websites do it to artificially force more page views for ad revenue. Try a long-press on the back button to view the history for that browser tab and click on the most recent page you think won’t redirect.