When a woman takes off for pregnancy it is known up front it is for several months, and she is also indisposed during that time (can't answer questions or take quick phone calls, because she is not able to perform at peak levels while convalescing). So an employer accounts for the loss of that duty in different ways such as shifting responsibilities. And many of these ways become a limit to career success. Imagine she is closing a large sales deal but has to leave before close due to pregnancy - so she is no longer the clear performer in that sale, as it is closed by someone else. This reduces her effectiveness on paper (becomes a detractor) due to gender differences (becomes unequal).
A man has been given flexibility to give and take that same time in a way that permits some juggling of work and family supporting efforts - i.e your example case. You worked part time, she could really not do that in her case. This lets you stay active in your role (little effect on your responsibilities) when she could not.