It was explained in the episode itself. We were supposed to assume that at that point the timeline indicated that Amy and Rory would one day leave the tardis, be left by the Doctor on Earth more or less about the time they left (wedding year, 2010) and, when the date came, they decided to visit the mining project in order to wave.
Bit of a wobble when Rory died but now we know the universe rebooted with him alive again things are back as they were with both waving at both the start and end of the story.
It implies that whatever happens in future episodes, Amy and Rory will ultimately leave the Doctor together and as a couple. Unless they don't, in which case we will have to imagine that ultimately the Silurian story replays itself only this time in accordance with the actual outcome of their tardis departure. And the BBC will have to come round your house and re-edit your series 5 boxset.