Why does the black king evade to f8, and not to h7? I'm trying to practice with the app https://f-droid.org/en/packages/jwtc.android.chess

Why does the black king go to f8, and not Kh7 instead?

 [FEN "r2rb3/1p2RBk1/2pP1ppR/p7/P7/7P/1q3PP1/3Q2K1 w - - 0 1"]

 1. Rxg6+ Kf8 (1...Kh7) 2. Rg8#
Kh7 would also result in mate due to Qh5. So both moves are equally "good" Kf8 Rg8 maybe was seen as less obvious than Qh5.