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.
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.