It's a rhyme. At one time in England it's said about two thirds of the males had one of 5 names:
William
John
Henry
Robert and
Richard
As a result there was a lot of confusion as to which William you were talking about or talking to.
So nicknames that rhyme were created.
William: Will, Bill and to a lesser extent Gill
Richard: Rick, Dick and formerly Hick. The last one was once so common it became synonymous with a non-sophisticated man.
Robert: Rob, Bob and formerly Dob and Hob. The last two spawned surnames like: Dobbins and Hopkins.