Oh and one more thing- it's not a simple rule at all, for 99% of men at least. Jewish men are also not supposed to masturbate by the way. So ideally from the day puberty kicks in, until the day they marry, they are not suppose to have any sexual experience. It is a fine ideal, but a biological impossibility. Judaism recognizes this and offers ways for men to repent for such avera.
It's a philosophical and spiritual question whether to consider sex out of wedlock as sinful, but at any rate the reality it is biologically impossible to expect everybody to adhere to that rule.