We had shotgun weddings back then. If a man knocked up a girl before marriage (which was common) he was expected to marry her and provide. And if he didn't want to, he was persuaded nonethless (hence, the shotgun). A man would be ostricized if he simply knocked up a girl and abdicated any responsibility.
And do people honestly believe that this provided absolutely no effective incentive for young men not to have sex with young women? Do people really think that the thought, "Do I want to spend the rest of my life with this girl?" didn't cross the minds of those boys and that this didn't make more than a few of them keep their flies zipped because the answer was "No" or "I'm not sure"?
Yes, that is true too. The only thing more shameful than a woman who had a kid out of wedlock was the man who would not do the honorable thing and marry the woman he impregnated. The problem is that society had stopped stigmatizing both sexes for irresponsibility.