Religion comes into play because the lobby against making birth control available to teenagers is also the lobby against abortion clinics (and any clinics that offer health services and birth control to teenagers) is also the lobby to teach abstinence in schools (or not teach sex ed. at all), and that lobby gets most of its funding from religious organizations.
So, the slightly awkward week in sixth grade where my teacher gave us anatomy lessons and a birth video is something my daughter didn't get to experience, even though I brought my family back to my hometown. Instead, she gets the even more wonderfully awkward talk from her parents, which my wife likes to paraphrase as "your mouth won't get pregnant" (thanks Bill Clinton).
Teen pregnancy is not currently a common issue (it has been declining since 1990), but that doesn't mean it won't start going back up if we continue making it more difficult for young women (and men) to have access to birth control and education about safe sex.
We even had some discussion in school about how to reduce the risks of experimenting with drugs, though I don't think many people followed those directions.
Religion never worked great, but it was all they had.
You are looking at a problem with a simple and well-understood solution, and instead of talking about implementation you're going "Tsk, tsk, it's their own fault for being stupid." So, yes, you're absolutely moralizing.
> it's not some arbitrary religious code.
Giving teenagers worthless abstinence education instead of proven sex ed is the definition of an arbitrary religious code.