Why does f6 gives white this big advantage? Furthermore, would it be more appropriate for white to capture the black pawn on e5, effectively giving away a central pawn, or to develop the light squared bishop on c4?
The reason why ...f6 is a bad move in the given position has to do with king safety. After Black plays ...f6 it is going to be extremely difficult for Black to defend the a2-g8 diagonal in the long run, and if white just places their light-squared bishop on c4 Black will not be able to get their king to safety by castling short.
But this is just scratching the surface of the long-term problems with ...f6. There are common tactical motifs against Black's king that become possible after Black plays ...f6 as well that one should be familiar with. Take the following lines after 3...f6, which in no way are meant to represent optimal play, but which illustrate some important points to keep in mind:
- dxe5, fxe5 5. Bc4 Be7?? 6. Qd5!, and there is no good way to defend against White's mate threat on f7. Of course, it is not necessary to play the blunder 5... Be7?? here, but the fact is that f7 is very hard to defend when there is no pawn occupying the square, and these kinds of tactics are very hard to deal with for Black in the long run.
- dxe5 Nxe5? 5.Nxe5 fxe5 6. Qh5+ g6? 7. Qxe5+, and white wins the rook on h8. Once again, Black is not forced to go into this line either, but the weakening of the h5-e8 diagonal is a big problem for Black in these situations and gives White many nasty tactical possibilities connected with moving their knight from f3.
- dxe5 fxe5, 5. Bc4 Nf6 6. Ng5 d5 7. exd5 Nxd5 8. Qf3, and Black is once again struggling to defend the weak f7 square. These kinds of motifs are usually not as dangerous for black in normal lines as they are here, but in this case Black has kind of "lost" an important tempo by playing an early ...f6, which has given white more time than usual to set up their attack.
So, in summary, ...f6 is bad here because:
- it weakens important squares around Black's king, giving White a clear target for attack, while making it harder for Black's king to find a safe haven,
- it wastes time, which makes it easier for White to set up a dangerous initiative against Black's king.
The above scenario is quite typical, and an early ...f6 is therefore often bad in many different openings. One of the few openings where an early ...f6 is sometimes a good idea is the French defense, and that is because in that particular opening none of the points I made in this post necessarily apply due to the special pawn structure in that case.
First of all, that is not the best move. Stockfish at depth 30 on a 16 CPU core with the latest offical realease says that bb5 is best. This is actually the Ruy Lopez opening, who probably released that f6 was a pretty dumb move as well. The Ruy Lopez attacks a knight which can be an annoyance if black plans to use that knight. It also gets out a bishop. F4 would also be a reasonable move in that position, also not the best for reasons that BB5 is actually helpful (described above). I actually tried playing this Stockfish vs Stockfish (same config as earlier) and white never lost the advantage the entire game and went on to win it, meaning that this opening is quite good. Black won when I tried F3.