Lesson
White to move. Main line: 1. Qh7#
The pawn on g6 is the whole pattern. It defends h7, so the queen can land next to the king and cannot be taken — and the king has no way to escape a piece it cannot capture.
Every flight square is already gone, and Black supplied most of them: the rook blocks f8 and the pawn blocks f7, while the queen on h7 covers g7 and h8. The defender’s own pieces do half the mating.
This is why the g6 pawn is worth so much in an attack, and why giving up a piece to establish one is a standard idea rather than a sacrifice that needs justifying.