Why ...g6 before ...Bxa6 in the Benko Gambit? [FEN ""]

1.d4 Nf6 2.c4 c5 3.d5 b5 4.cxb5 a6 5.bxa6 g6 6.Nc3 Bxa6


This is a main line of the Benko Gambit. Black could also have played 5...Bxa6, followed by 6...g6 to get the same position.

However, 5...Bxa6 is played only half as often as 5...g6, and the majority of those games go 6.Nc3 d6 in my database, more often than 6...g6. So to reach the game position, g6+Bxa6 is about four times as popular as Bxa6+g6.

Is there some minor detail that makes 5...Bxa6, 6...g6 less attractive?
No, there are no real differences between the 2 lines. White has no way to defend the pawn, so black can choose the move order they feel most comfortable with.

You see something similar in the french defence:

[FEN ""]

1. e4 e6 2. d4 d5 3. e5 c5 4. dxc5 Nc6


Black could have regained a pawn straightaway with 4...Bc5, but decided to develop a knight first, seeing as white has no way to defend that pawn.

Edit

I found this explanation of 5...g6 on wikipedia


  The main line continues with the moves 4. cxb5 a6 5. bxa6 Bxa6 followed by Black fianchettoing the f8-bishop. (Black players leery of the double-fianchetto system, where White plays g3 and b3, and fianchettos both bishops, have preferred 5...g6 intending 6.b3 Bg7 7.Bb2 Nxa6! The point is that it is awkward for White to meet the threat of ...Nb4, hitting d5 and a2, when Nc3 may often be met by ...Nfxd5 because of the latent pin down the long diagonal.)


The double fianchetto has fallen out of favour seeing as the king's walk variation gives a good game for white.