[deleted]
There is always more to be said, but you may be interested in my previous answer to Does anyone know of historic or memorable codpieces? It explains the actual function of a codpiece - it covered up an area that had been left completely open when men wore longer tunics.