This shouldn't preclude another answer to this question, but you might be interested in past codpiece threads:
"Medieval tight pants, how did they make them so tight, are they easy to wear?" answered by /u/kittydentures (their diagrams and remarks describing the development of joined hose might clarify the purely-functional function of a codpiece -- keeping bits covered as men's leg-coverings transitioned away from split hosen.)
"Does anyone know of historic or memorable codpieces?" answered by /u/chocolatepot (addressing the symbolic importance of codpieces)
"King Henry the 8th's armor famously has an exaggerated cod piece. Was any purpose for this feature recorded at the time. What would have been the popular reaction to this." answered by /u/stone_tigris (with respect to symbolic importance and possible other uses of the codpiece)