After sequece of these moves:
- d4 d5
- c4 e6
- Nc3 Nf6
- Nf3 Be7
- Bg5
Black should play move h6. What is the point of it? Black should't play g5 as follow up and Knight is still attacked.
After sequece of these moves:
Black should play move h6. What is the point of it? Black should't play g5 as follow up and Knight is still attacked.
The main difference is in systems with b6 (planning to fianchetto bishop) and it occurs rather deep.
Let's try without h6 first (black can and should play differently if he decides to play without h6):
[FEN ""]
1. d4 Nf6 2. c4 e6 3. Nc3 d5 4. Nf3 Be7 5. Bg5 O-O 6. e3 b6 7. cxd5 Nxd5 8. Bxe7 Qxe7 9. Nxd5 exd5 10. Rc1 Be6 11. Bd3 c5 12. dxc5 bxc5 13. Qc2 *
And white has advantage, due to double attack - both c5 and h7 are attacked twice.
On the other hand in the main line of Tartakower–Makogonov–Bondarevsky System this tactic doesn't work, since pawn is on h6, so there is nothing to attack on h7:
[FEN ""]
1. d4 Nf6 2. c4 e6 3. Nc3 d5 4. Nf3 Be7 5. Bg5 h6 6. Bh4 O-O 7. e3 b6 8. cxd5 Nxd5 9. Bxe7 Qxe7 10. Nxd5 exd5 11. Rc1 Be6 12. Bd3 c5 13. dxc5 bxc5 14. Qc2? *
In similar situations, this is called "asking the question" If you thought that White obviously did want to capture, you might just wait for them to do so. In this particular case, White very seldom does capture, but retreats, almost always to h4. In the subsequent play, Black has gained luft, which is almost almost always useful, But sometimes White can sacrifice on h6, and sometimes prize the position open with g2-g4-g5. Others have pointed out various aspects, A complete answer would be book-length.