Found a good article titled Rationales for movie sex and nudity:
“To avoid the charge of presenting scenes involving “gratuitous sex and nudity,” Hollywood filmmakers often suggest a reason (or at least an occasion) for their stars’ behavior, offering various rationales for movie sex and nudity during each decade of the twentieth century.”
In many ways this phenomenon was also apparent in European art from the Middle Ages until the 1850s. But the rise of modern art and the related rise of realism in the arts in France changed all that. Artists no longer wished to hide behind artistic pretexts to represent nudity and eroticism. An important example of this is Manet’s Olympia.