When actresses act in films, nudity can be expected, but not all agree to play them.
Some actresses who don't want to do nude scenes in movies use stunt doubles, who shoot them for them. This is the sensational case of Julia Roberts, who never agreed to play the nude scenes personally, not even in her debut film Pretty Woman, but also of other actresses such as Reese Whiterspoon and Sarah Jessica Parker, stars of Sex and the City.
Still other actresses, such as Margot Robbie, have agreed to do so only in a few films. In his case it was The Wolf of Wall Street.