a5 is directed at stopping white from playing b4, so I'm assuming it is a reaction to white playing a4 and considering b4 more of a threat. It could also be to avoid some line involving the b5 square with say a Bb5 move as well. I'm a bit curious about the difference between a5 and a6 in general because if you plug move 6 into stockfish, it doesn't seriously consider a6, but it is played the most at the top level (admittedly there are lots of moves in these lines with similar evaluations).
Could someone explain the nuance behind black playing a6 and then a5 in the a4 lines of the Guiocco Piano?