There shall not be a promiscuous woman…and there shall not be a promiscuous man… (Deuteronomy 23:18)
A person who hands his daughter over to another man for the purpose of marriage performs a meritorious act. If he hands her over not for the purpose of marriage, he degrades her and brings the nation down spiritually. We discussed cases of seduction (Mitzvah #61) and rape (Mitzvah #557), which are crimes and for which fines must be paid. If a sexual act is completely consensual between an unmarried man and woman, it is not a crime and there is no fine, but it is still not permitted because of this mitzvah.
The Ramban (Nachmanides) understands this mitzvah differently. He says that relations between unmarried people are not inherently prohibited by the Torah, only relations between two people who would not be permitted to marry under Jewish law. Therefore, he says that this verse prohibits promiscuity because a promiscuous person does not tend to examine whether a potential partner is someone fit for them to marry. (For example, a prostitute is not likely to ask her client if he’s a kohein.) This position is supported by the Talmudic definition of z’nus (promiscuity) as relations between two people who are unfit to wed (Yevamos 61a).
Of course, even according to the position of the Ramban, this is not to permit premarital relations in practical application. It would only say that such a liaison is not the subject of this mitzvah. There are many additional factors that would still prohibit such a relationship in the actual.
The basis of this mitzvah is to combat immorality. Unbridled relations, even between partners who are not inherently prohibited, can lead to all sorts of problems. One example is that of questionable paternities. Nobody wants to end up on a daytime TV show where the host says, “You are not the father” but there are bigger issues than that. Not knowing who a child’s father is can impact not only rightful inheritance, it can make a major difference in not accidentally marrying one’s aunt or half-sister.
This mitzvah applies in all times and places. It is discussed in the Talmud in the tractates of Kiddushin (80b) and Yevamos (37b). It is codified in the Shulchan Aruch in Even Ha’Ezer 177. This mitzvah is #355 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #133 of the 194 negative mitzvos that can be observed today as listed in the Sefer HaMitzvos HaKatzar of the Chofetz Chaim.