I think sex scenes in movies are almost somewhat mandatory. It builds development between two characters and is most likely the reason for it being there. When you have a movie that involves two characters having sex, and one of them dies later in the movie, you feel a loss for the other character(this usually involves the main character; i.e The Terminator, Leathal Weapon), bringing you closer to the character at loss.
For my movie, Weapon of Choice, I had plans for a sex scene with one of the main characters for the sequel. She later dies by the hands of the enemy, and sets a plot for revenge for the main character. This is another great example of why a sex scene can be so important.
Yea but what about all the exploitation films (now and then) that just put nudity in there to up the selling value of the film.