Invented in the 15th century, the codpiece's initial purpose was to preserve men’s modesty (“cod” meant scrotum). However, by the 16th century, the modest pouch grew into somewhat of a fashion statement, as well as a whopping symbol of virility and masculinity. We can safely assume the codpiece eventually became a measuring device of sorts as later designs indicate padding and enlarging of questionable proportions.
While Henry VIII and many of the Italian royalty were famously proud wearers, I came across the thing during my research of Landsknechts — Germanic mercenaries of that historical period.
Warning: You will not be able to unsee the following images :)