Black's last move 9... f5 stopped White's threat of sacrificing the bishop on h7.
If White doesn't capture Black's f5 pawn en passant now, then their king bishop's diagonal (b1-h7) will be blocked permanently.
Because having their king bishop on a blocked diagonal certainly won't help White's kingside attack at all, White usually decides to capture the f5 pawn en passant 10. exf6.
However, in a few games White also played 10. Qh3 - in hope for opening a file on the kingside for their rooks at a later time.