Why was adultery/sex looked at as a negative conduct throughout ancient history?

by Samidare

From the Buddhist [Five Precepts] (http://en.wikipedia.org/wiki/Five_Precepts) to the Egyptian's [doctrine of Maat] (http://en.wikipedia.org/wiki/Maat) they all view sex as a bad thing (I am sure there are more examples from different cultures) but why is that?

How was it able to change to today's world view of sex generally accepted as okay?

Dixnorkel

I'd like to add to the question if I may. The only logical explanation I could imagine was that STD's might be more common in adulterous relationships. Does this explanation hold any truth, and if so, would STD's have had a significantly higher mortality rate in ancient times? Were there ever instances of viewing the sicknesses as divine punishment?