

It’s because the hand joker card there allows straights and flushes to be made with 4 cards, so the 4 black suited cards make a flush, and the gapped sequence makes a straight, since both hands are made together it counts as straight flush. You can ignore the ace. It can get weirder because you can make a 4 card straight and toss another card unrelated but with the same suit as 3 of the straight cards and it still counts as straight flush.
My favorite was the hack before that one was discovered on the Wii, where you loaded up a corrupt save for zelda twilight princess that had a weird name for your horse, and then just walked backwards and BAM, game crashed and you are in.