This is a running gag throughout the entire program. It turns out that Jennifer Aniston's character is the one that's pregnant. Ms. Aniston plays a single lady with a low-paying job and no steady boyfriend. Now most kids will shrug this off, and no damage will be done. But there is no question that by having two attractive characters engage in unwed pregnancy, the producers of Friends have made that situation more socially acceptable, at least to some impressionable kids who may not have mature parental guidance.
Friends is a funny program with great actors and writers.
Surely you can develop plot lines that accentuate positive behavior. Once again, this isn't a sex thing. We're living in a world where just about anything goes, and that is damaging us as a people. Kids tend to be egocentric and live in the present. If they see certain types of behavior glamorized, that behavior becomes more attractive.