It's documented that baybees strain even good relationships.
Anyone who has ever been in a bad relationship knows it's counterintuitive to suggest otherwise. Think of the phase when the relationship is souring. Generally, you fight about everything and a baybee would amp up the stress level exponentially.
It's really stupid to suggest baybees unite people and that suddenly all problems and incompatibilities are MAGICALLY RESOLVED, but it's a common, overused Hollywood plot.
It fucking irks me that writers cannot think of anything else to write about, but many are uncreative hacks.
1. 1997
Fools Rush In: the woman gets pregnant after a one-night stand. They have nothing in common and COMPLETELY different values, but of course they get married anyway and all their problems magically melt away due to Baybee.
2. 2007,
Knocked Up: Lather, rinse and repeat
Hey it's been over 10 years--I'm sure we are due for another installment. I'm probably missing a few others just because I do not pay attention to movies now anyway.
ETA: Thought of another one.
3. 2014
This is Where I leave you. I generally liked this movie, but one of the main characters of the movie finds out his wife was cheating with his boss for over a year. He walked into his apartment and found them, and his father died shortly thereafter. He naturally wants to get a divorce but the wife turns up pregnant and the BF apparently was snipped/sterile. The wife pretty much says the reason she had an affair was because they had a pregnasty loss or something. (To the writer's credit, the husband shreds her over this and says how ridiculous it is. "I hope you aren't suggesting that your lost pregnancy was a reason to fuck my boss? Sure seems like you are headed that way.") I also generally liked the movie because there is a woman who is a classic, desperate infertile. The same character tells her to be grateful for her marriage and infertility is no reason to ruin your marriage.
Of course, the guy melts when he sees the heartbeat and decides to "forgive" his wife and he tells her their baybee will never be alone. There is a suggestion that they may get back together even though he says they can be divorced and still be co-parents, and he is hooking up with someone else.