Ethology may provide a key to explanation of this state of affairs. The scientists have observed that there are species of monkeys living in groups, of whom the males act as guards practicing the specific “animal ritual”. They sit up at the outposts, facing outside and presenting their erect genital organ. The most notable thing here, I think, is that the basic function of sexual activity is suspended for the sake of communication. Every individual approaching from the outside will notice that this group does not consist of helpless wives and children, but enjoys the full protection of masculinity (see W. Burkert, Structure and history in Greek mythology and ritual (University of California Press, 1982)).
It is the most powerful signal with respect to group hierarchy, but definitely distinct from the reproductive process. It is believed that the genital display is an important social signal by which the animals communicate and that it is ritualized and seems to acquire the meaning, “I am the Master.” (J. Mouratidis, The Origin of Nudity in Greek Athletics, Journal of Sport History, Vol. 12, No. 3, 1985)
In the case of humans, the similar behavior may occur in aggressive or threatening situations: It has been emphasized that penis-exhibition can have a purely aggressive role, and … may occur without erotic arousal, as an expression of aggression. The phallic sign may symbolize dominance and power. In ancient times it was also a gesture against the evil eye and disease.
In the early days of the human civilization, the nude body was considered as an incarnation of energy and power (K. Clark, The Nude: A Study of Ideal Art (London, 1957)). The belief that nudity acts as a screen which guarded man from many evils and at the same time provides with power and energy echoed in ancient Olympic games, but at present, for some people, it takes a form of exhibitionism. The another category of people tends to be extremely preoccupied with their “animal instincts” and still considers nudity as a form of aggression.