I asked something like this. The reasoning if I can remember:

1. You should not sell your daughter as prostitute.
2. Rambam said that all sex outside marriage is prostitution.
3. Therefore sex outside marriage is sin.

Okay I found problems here. Obviously nowadays, most prostitution are not done by parents selling their daughters.

However, that's kind of moot. I read further and see the reason why Rambam think all sex outside marriage is prostitution. [Why does the Rambam (Maimonides) equate all sex outside marriage as prostitution?](https://judaism.stackexchange.com/questions/11251/why-does-the-rambam-maimonides-equate-all-sex-outside-marriage-as-prostitution)

Rambam is concerned with kids not knowing who the father is. [Hilchos Naarah Besulah 2:17](http://www.chabad.org/library/article_cdo/aid/960635/jewish/Chapter-Two.htm)

> 
> For [ultimately], a father will marry his daughter and a brother his sister, [for in a sexually permissive society] a [girl] may become pregnant and give birth without knowing who the child's father is.
> 
> 
> 

But then again, we have paternity tests for that that's far more accurate than marriage.

**Note:** 
Nowadays, paternity fraud is more "rewarding" if the woman is married. Both sex with married women and sex with unmarried women are legal as long as you don't pay her. The former means the husband will be required to pay child support irrelevant of DNA tests results. So getting married means you're pretty much showing your back causing the very problem Rabam objects about sex outside marriage.

In other words, Rabam's main concern, namely paternity, is simply not mitigated by marriage nowadays. In fact, it's made worse.