Why do they name people dick?

People name dick is known as an insult very offensively. This should not be said to people unless you want a problem