Doesn't make sense to me that children, the product of sex, would be produced by people who aren't married if it's a sin for them to have sex.
Numbers 25:1
ESV - 1 While Israel lived in Shittim, the people began to whore with the daughters of Moab.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.