While f6 sounds like a decent plan too, Stockfish recommends to advance the a-pawn, bring the bishop to c5 and the knight to c6 (or maybe to f5, depending on what White plays). The thing is that if Black doesn't play a5 now, White can play a4 and Black won't be able to respond by b4, hence the a4-e8 diagonal or the a-file will open up to White's advantage.
The biggest weakness on Black's kingside is not f6 but f7. Typically in the Grand Prix, White sacs a pawn on f5 in order to open up either the bishop's diagonal, or the f-file, or the g-file, depending on the way Black captures the pawn. That's why castling is worse than it seems at first glance.
Regarding the prehistory of the position, g6 and Bg7 was played long before, while the purpose of d5 was to shut White's bishop out, because of the abovementioned f5 sac threat. White normally takes en passant (exd6), but this opponent chose to keep the centre closed and double my pawns.
This might be the critical position of the opening (after White's move 8):
In
Pujari vs Prathamesh, Black chose to castle first, allowing the doubled pawns. After 9. Nxd4 cxd4, White put the knight on e4, which allowed Black to play d5 with a tempo and then, after White played 10. Ng5? instead of exd6, elegantly undouble the pawns by playing Qa5 (forcing White to move the c-pawn to save the b5 bishop).
However, there were 5 other games with that position shown by Chesstempo, and the 8... a6 line, where there were 3 games, all won by Black, instead of 1, sounded more legitimate. Though I saw that both games with 9. Bc4 d5 10. Bb3 Nec6 had been won by White, I thought that was because Nec6 (with the idea to recapture on d4 with the knight, which I didn't realise) was too passive (??!) and that b5 would look more intimidating (well, it wouldn't have been be such a big mistake had I realised that the doubled pawns were no big deal and shoved the a-pawn down with the support of the f8 bishop, but I got too lost and nervous).
@Rei: I do think that my castling decisions are objectively bad, in the above games in particular. I guess I'm smart enough to avoid castling into a direct attack, and I don't remember any blunderous decisions you're talking about.
Besides, I believe that tactical oversights are consequences of strategic errors - in particular, tactics against the king arise when he's put on the side of the board where opponent's pieces are concentrated or can be switched over relatively fast. Even when I don't miss a direct mating attack, calculating lines deeper in order to avoid it tires me, and so I become prone to missing other tactics too.