Why are Marines Called Leathernecks?

Leather worn about the neck would seem a bit uncomfortable to me. But US Marines were called this back in the Barbary pirate days. It is said the term came form the fact that the Marines wore leather neck bands to protect their necks from being slashed. Or another legend says they were worn to keep their heads high and straight. For more information look here: