user924: [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?

user12540: There is technically as such not such a great difference but it implies a Basic Chess principle . Development of the Dark Square Bishop on Long diagonal ASAP . 
Black knows that the Pawn on a6 is not going anywhere . He waits to capture either with Knight or Bishop or even Rook sometimes . Playing g6 Black makes the way for castling or makes some space for his King on f8 

user-1: 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. 

924: <pre><code>[FEN ""]

1.d4 Nf6 2.c4 c5 3.d5 b5 4.cxb5 a6 5.bxa6 g6 6.Nc3 Bxa6
</code></pre>

<p>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.</p>

<p>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.</p>

<p>Is there some minor detail that makes 5...Bxa6, 6...g6 less attractive?</p>
 12540: <p>There is technically as such not such a great difference but it implies a Basic Chess principle . Development of the Dark Square Bishop on Long diagonal ASAP . 
Black knows that the Pawn on a6 is not going anywhere . He waits to capture either with Knight or Bishop or even Rook sometimes . Playing g6 Black makes the way for castling or makes some space for his King on f8 </p>
 -1: <p>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.</p>

<p>You see something similar in the french defence:</p>

<pre><code>[FEN ""]

1. e4 e6 2. d4 d5 3. e5 c5 4. dxc5 Nc6
</code></pre>

<p>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.</p>

<p><strong>Edit</strong></p>

<p>I found this explanation of 5...g6 on <a href="https://en.wikipedia.org/wiki/Benko_Gambit" rel="nofollow noreferrer">wikipedia</a></p>

<blockquote>
  <p>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.)</p>
</blockquote>

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