Just rewatched it.
I looked for why Rory went back to the gravestone.
It wasn't so arbitrary as some people here make it out to be.
He walked past the stone and he seemed irritated by something he saw out of the corner of his eye and went back there because it kept bugging him.
I can easily imagine doing the same thing if I walked past my "own" gravestone, or even just one with my exact name on it, without realizing it right away.