It is obvious that fewer people will watch a TV show if it includes many sex scenes. Children will be disallowed to watch it, families with children that enjoy TV together will search for alternatives, conservative and/or religious people will avoid it, and for similar reasons, it may be banned or not broadcasted in entire countries.
On the other hand, I imagine very few people would not watch a TV show that they already enjoy if it were stripped of all its sex scenes. Take Game of Thrones or Spartacus, but delete all sex scenes. Will substantially fewer people watch them? I very much doubt it.
So, given that, why do these shows include that many sex scenes? Is my premise wrong (it does actually lead to increased viewership), or are there other reasons?