Doughboy, gob, and leatherneck, as familiar designations of members of the Army, Navy, and Marine corps, respectively, of the United States, have long been subject to speculation, and still are.
No one knows; the origins remain inscrutable.
As to leatherneck, H. L. Mencken said at one time, “It obviously refers to the sunburn suffered by marines in the tropics,” overlooking the fact that sailors, with their low-cut collars, were even more exposed to sunburn.
Among the theories advanced is the Navy version as it appears in George Stimpson’s Book about a Thousand Things (1946):
“Many sailors maintain that leatherneck originally referred to the dark and leathery appearance of a dirty and long-unwashed neck. It may be a myth, but according to Navy tradition marines in the early days were dirty of person. In sailor slang, washing without removing the undershirt and jumper is called a ‘leatherneck’ or ‘marine wash.’ When a sailor washes, according to the sailors, he usually strips to the waist and washes his face, neck and arms; but when a marine washes he does so after the fashion of civilians, that is, he merely takes off his coat and rolls up the sleeves of his shirt to the elbows and washes his hands to the wrist and his face to the neck. That, at any rate, was the version formerly given by sailors.”