system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How in the hell do nicknames work in English ?

Hi Reddit ! I'm French, and I have two questions.

First one is : how do you get Dick from Richard ? How do you get Bob from Robert ? In France, most of our nicknames are either the first syllable (Samantha becomes Sam) or the first syllable, but doubled (my name is Myriam, the logical nickname is Mymy).

Seconde one is : how can you casually call people "Dick" ? No one here could have a nickname meaning "penis" or "vulva" or "vagina". No one would use it. Except bullies maybe.

EDIT : I think I made a mistake in my title. I don't think "in the hell" is correct. Eh. Too bad. Sorry.
gpt
A lot of it is a rhyming scheme. So from Richard, it becomes Rick, and then Dick. From Robert, it becomes Rob, which becomes Bob. 

There are some debates about the etymology of 'dick' in the penis sense, but it's clear that Richard (and the nickname as explained above) has much older roots than 'dick' in the sense we know it now, as the latter is actually a relatively recent development for the use of the word. 

Edit: 
I would like to add that one of the suggested routes for exactly how it came to mean penis is that it was a nickname first, at least around the 12-13th century, then because it was such a common name some years later, it became synonymous to mean a male, such as in the phrase, 'Every Tom, Dick and Harry'. It eventually became a nickname for police officers or detectives in the late 1800s/early 1900s, and also a nickname for a riding whip, and around that same time it also started being slang for penis. So as causation can't really be proved, you can see how a number of ways could have influenced how it came to be. 

Just to point out from comments here, spotted dick is thought to have originated from spotted pudding, to puddick, to dick.