Could you be referring to Kimi Ga Nozomu Eien as well, when
Mitsuki slept with the male protagonist's best friend, even though I never liked Mitsuki in the first place?
Personally, I have always liked such characters, the one doing the "defiling" and the one being "defiled", not because of the sexual themes involved, but rather, for the development of the storyline. More often than not, these sexual scenes are included because they play an important part in affecting the emotions of those involved, as well as those around them.