Why sex in public is generally disapproved of by society (idea)

Society's sexual taboos today (unlike a couple centuries ago) are mostly about not embarassing anyone by showing off that you have more or better sex than they do. This is why following things are frowned upon:

Looking at the penis of the guy in the urinal next to yours -- his could be bigger or smaller than yours. Nobody should know about this. Could be embarassing.

Having sex in public -- there are many people who don't have sex at all.

Being overly seductive in public -- it's embarassing for those people who aren't all that sexy.

...

I'm sure you could continue the list. The point is: Much like beauty, our society does not consider sexual activity or sexual attractivity a merit that is earned. And basically everything is frowned upon which cannot be earned in socially acceptable ways. After all, people even frown upon intelligence, sometimes.