Is adultery illegal? There are other destructive sexual behaviors which are not illegal, also. This is why I'm surprised.
Adultery used to be considered bigamy; ergo illegal. i.e. cohabiting with someone other than your spouse.
http://legal-dictionary.thefreedictionary.com/marriage