These 8 arrangements aren't hardcoded in, as you expect, but look to be the result of a number of coding errors identified in the shuffling routine.
As the YouTuber notes, this game is much easier than it should be, with the number of possible arrangements being drastically reduced from 57.9 billion to just 8. This is the game where you flip over cards on a table to make pairs of matching icons. 3, which actually suffers from the opposite problem. He also goes on to take a closer look at another mini-game from Super Mario Bros.