Is this a legitimate defence to Ruy Lopez openings? When I play the Ruy Lopez opening, I usually get my bishop chased all the way down to the second rank by two pawns. I don't know if this is common at higher levels of play but it seems like a pointless pursuit.

[FEN ""]

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 b5 { Spanish Game, Morphy Defence, Caro Variation } 5. Bb3 a5 6. a3 a4 7. Ba2 *


Does doing this give either player an advantage at any point during the game?
It is extremely uncommon for Black to play like this at the higher levels, and that is because, as you stated, it's pointless. Black achieves nothing in particular by this chase, and White ends up with a standard opening advantage. Worth noting, however, is that after 5...a5 by Black, White is in no way forced to play a3. A standard developing move will do, as the bishop can go to d5 if nothing else.