What's the deal with loincloths?

Seriously, what's the deal with loincloths? Why did humans decide they need to cover up their genitals? It seems to be pretty universal, like no matter what culture you are from no one wants to see your peepee.

When did people start wearing these and why? Have homo sapiens literally always worn these (i.e. Were they were developed by an ancestor species and we inherited them?)

How far back in time do I need to travel to finally be free?