This is completely a-historical. Humans have been having sex outside of marriage since that concept was invented and you’re projecting an idealized Western European view on an entire world with a complex history of different cultures. What you’re describing isn’t even true of European history (e.g. read up on hand fasting or the high rates of marriage after pregnancy) and it’s even less so globally. Marriage is in part a financial relationship, and that drive a lot of premarital sex: if men were expected to make a significant monetary contribution (dowry, house/land, etc.) even in the most religious societies many would not be celibate for a decade, they just weren’t having sex in formal legally-binding relationships.
One other key thing you’re leaving out: historically, many women did not have the freedom to choose whether they had children, or often who or when they married. Unless you’re proposing a new take on Ceaușescu-era Romania, that is not relevant to the discussion of fertility rates.
This isn’t a western view, it’s literally how the majority of the world still operates. Marriage is not an abrahamic invention, it happens in eastern cultures, middle eastern cultures, african cultures, it’s basically universal.
Before contraceptives sex outside of marriage results in children born out of wedlock. This is catastrophic for the mothers, their families, and for the child.
In the past they used to build temples dedicated to Moloch for sacrificing unwanted babies. The Israelites looked down on this practice, and instead insisted on marriage with rules: thou shalt not commit adultery, thou shalt not covet thy neighbor’s wife. These rules were crucial for social stability.
Why is marriage and punishment for adultery universal? Because a two parent household is the only healthy way to raise kids and ensure wealth is preserved between generations. This has always been true.
One other key thing you’re leaving out: historically, many women did not have the freedom to choose whether they had children, or often who or when they married. Unless you’re proposing a new take on Ceaușescu-era Romania, that is not relevant to the discussion of fertility rates.