Yea, that's the major factor. Staying home to take care of babies not only holds up your pay scale, but takes you off the track for more competitive positions very quickly. Women find it very difficult to jump back in on their previous career trajectory when they do return. It's to be avoided at all costs if you're an ambitious women.
Ideally, people having kids wouldn't cause the wage gap to grow. But the push for women to downshift is really brutal, and most of it comes from other women (mother in laws and sanctimommies).
People have their priorities, but what's often missing from modern parenting is any semblance of cost benefit analysis. A key example is breastfeeding. The long-term medical benefits of breastfeeding, unless you're in the third world and lack access to clean water, are quite tenuous. But the practical benefit of bottle feeding is real: feeding can be totally delegated to the father. For my wife and I, this has been a huge boon to equitable division of child care between the two of us. I'm the nighttime parent, the "I'm hungry" parent, the "I need comfort" parent. My wife is the "roughhouse with the kid after work" parent. If I were totally dependent on my wife to pump, and if she had breastfed, I doubt I could have established that told with our daughter. Yet, my wife gets a lot of snide comments from other women in her mommy circles who have their kid strapped to themselves 24/7.
Women are pressured with these parenting fads, but taking them on basically concedes to taking on the role of primary caregiver.
Ideally, people having kids wouldn't cause the wage gap to grow. But the push for women to downshift is really brutal, and most of it comes from other women (mother in laws and sanctimommies).