> Could this become a "don't hire married people in their late 20s and early 30s" incentive?
Not for a good company. I've had several employees go on maternity and paternity leave. I've given them respect, and time, and money, in order to make this time of their lives as unstressful as possible.
I've done it because it's the right thing, but these people remember being treated well. They've come back to work and done very well. They feel safer knowing that their day job explicitly supports their families.
The time someone needs off work to care for a new family is a drop in the bucket compared with a whole career, or even a few good years spent at one company. Optimize for the humans, and for the long term.