In some families and ethnic groups, there are tendencies to pass on certain names. Sometimes this is done in a certain fashion, perhaps the oldest son for the father's father, the oldest daughter for the father's mother, and then on down the line.
Remember that this practice was a tendency in some families and is not proof of anyone's name at all. Names can be used as clues, but they are "extremely circumstantial" ones at best. And if both grandfathers are named John and both grandmothers are named Anna, then you really have a mess!