The name comes from the top of the cap, which, when triple-creased, resembles a vagina. To preserve the dignity of the wearer, the hat, and the branch of service while maintaining the humor of the name, many troops abbreviate the name to "C-Cap".
Newer variants of the cap lack the triple crease on top, effectively eliminating the resemblance to genitalia, though it's doubtful that the hat's undignified nickname caused this change.
"Like hell! The Army came up with that fine nickname years before any of you slimy ship rats!"
"You're both wrong! It was a Marine!"
*this argument continues endlessly and pointlessly until armageddon*