I am thinking about it from the evolutionary perspective. For nudity, I thought that maybe nude bodies may be associated with a higher probability of infection and diseases due to exposed parts. I also thought that maybe there's a social reason such that it's considered a better social status to be dressed; as an indicator of wealth and security.
But then when you think about it, it's not necessarily nudity that is frowned upon, it's the exposure of private parts. Considering that our reproductive organs are also used to dispose bodily waste, it makes sense to associate some sort of negative emotion with them. But then again, why would female breasts be considered indecent?
Also, when it comes to sex, clothed intercourse is still considered shameful. Sex is not only considered as a private activity, but also as a sin by lot many religions; it's also associated with morality. Gluttony, also being a function of our greed and bodily pleasure, doesn't receive the same amount of repulsion as does sex. Wouldn't it make more sense for the society to promote sex considering that it increases the probability of the continuation of our species?