In retrospect, I find a lot of the YA books I read as a pre-teen or adolescent very preachy and much too directed at convincing girls that having sex one time would almost always result in pregnancy, saying absolutely nothing about the pros of using contraception, and implying to girls that even unplanned and unwanted pregnancies would ultimately lead them to end up in a marriage earlier than planned but a happy one. The two that come to mind are Too Bad About the Haines Girl and Mr. and Mrs. BoJo Jones. In the first one, a high school student gets pregnant, almost has an abortion (illegal at that time) but refuses because of the unsanitary conditions, and ultimately tells her parents that she's pregnant. They of course are completely supportive and understanding. In the second one, the girl gets pregnant and marries her BF, but their child dies when it is born prematurely. Everybody's parents then want them to separate and pursue their original plans of attending college, but they decide they really do love each other and end up in college housing for married students, poor but happy.
And it's not that the books were completely unrealistic; there were arguments and hurt feelings, and concerns about money and crushed dreams. But I think about the people I knew who did get pregnant in high school and got married, and their reality was often quite different. There were parents who were horrified and threw their daughters out of the home, or forced them to go to homes for unwed mothers, or insisted on having a pro forma marriage with the father so the child wouldn't be illegitimate. There were parents who were convinced that the girl had gotten pregnant deliberately to trap their son, and harassed the girl. There were couples who got married because of an unplanned pregnancy and were divorced within a couple of years. I can think of exactly one girl from my high school whose path seemed to mirror what was in these books, and the last time I saw her she had two toddlers by age 20 and not the slightest expectation of ever having a paying job, when prior to the accidental pregnancy she'd been considered very bright and definitely planned on going to college. Who knows, maybe 5 years down the road she decided to get her GED or something and go to college, but I'll never forget the look on her face when I saw her last. She was looking at her two kids and she obviously loved them, but there was more than a hint of being resigned to a life quite different from what she'd envisioned just a few years prior to that.
I know there are books now that give a more realistic and diverse view of sexuality in high school kids, the problems with marrying solely because of a pregnancy, emotionally abusive parents, and so forth; I also know that the books I read reflected some societal attitudes of that period. But I can't help feeling that with those books, and so many similarly themed books (don't go steady with someone because things will get too "serious;" don't be in a hurry to grow up because you should stay a child as long as possible, etc.), the intent was less to explore a character and more to be propaganda.