After 1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 e6 5.e3 Nbd7 6.Qc2 Bd6 White can play the so-called Shabalov-Shirov Gambit with 7.g4!? on the grounds that 7...Nxg4 allows 8.Rg1 and the important g7 Pawn is going to fall. Of course this is not a forced win by White, but this Gambit puts certainly some pressure on Black.
My main question is: why is Black always playing 5...Nbd7 and 6...Bd6 (or in reverse order) and not 5...Bd6 and 6...0-0, after which 7.g4 could be more safely accepted with 7...Nxg4 (the g7 Pawn is no longer en prise after 8.Rg1)? Is there any particular reason for playing 5...Nbd7 or 6...Nbd7 before castling?