I think we should more carefully read the Gospel (Luke 1:59-66):
And it came to pass, that on the eighth day they came to circumcise the child; and they called him Zacharias, after the name of his father. And his mother answered and said, not so; but he shall be called John. And they said unto her, there is none of thy kindred that is called by this name. And they made signs to his father, how he would have him called. And he asked for a writing table, and wrote, saying, his name is John. And they marvelled all. And his mouth was opened immediately, and his tongue loosed, and he spake, and praised God. And fear came on all that dwelt round about them: and all these sayings were noised abroad throughout all the hill country of Judaea. And all they that heard them laid them up in their hearts, saying, what manner of child shall this be!
People was so surprising, "marvelled all", because Zacharias advertises to people (maybe by the signs if he could not speak yet) that his child already had the name which was previously given by God through the Angel Gabriel (Luke 1:13):
But the angel said unto him, fear not, Zacharias: for thy prayer is heard; and thy wife Elisabeth shall bear thee a son, and thou shalt call his name John.
A little different interpretation was given by Saint Theophylact of Ohrid (1055–1107) who wrote (sorry, I can not find free english translation) in "The Explanation of the Holy Gospel":
Захария, не будучи в силах объявить им знаками, просит дощечку; и когда он относительно имени дитяти оказался совершенно согласен с женой, «все удивились», ибо не было сего имени в родстве их, и никто не мог сказать, что оба они уговорились об этом еще прежде времени.
This means that Saint Theophylact thinks that Zacharias and Elisabeth can not talk to each other (Zacharias by the signs because he could not speak) about a name of their child and people knew about it, so were surprised by the coincidence of names happened by God's Providence and the fact that the child's name was not selected from the genealogy of parents.