But for society as a whole, these things are good. Long maternity (and paternity!) leave is good for the children that will one day grow up and become productive members of society. Having laws around parental leave preventing discrimination means that society doesn't have to deal with paying unemployment welfare for women around 30, and having a hard time re-integrating them into the workforce at 40. Instead this cost is spread out among all the companies in the form of employment laws.
I understand that all businesses wish to have a workforce consisting only of young well-educated males that are never sick, never take vacations and work lots of overtime, but there's a cost to getting that, and almost all businesses forget, or refuse to understand the value society provides to them. You want a workforce? Sure, it's gonna cost you, both in corporate taxes, and in social responsibility by employing less desireable individuals. Tough shit, pay up.