Just ask Lady V and Elwyn above if you want. They're who I'm referring to. One made a post on being reasearcjer and the other working in IT. In both cases it seemed apparent that sexism wasn't within the workplace.
And I wouldn't call the logic invalid. Not all women take maternity leave and obviously some men will. You can't even really expect to know how someone will react so basing it off gender and biology isn't that bad. To me, it's an issue that should be clarified before employment begins. That way all parties are clear on what's expected instead of assumptions on either end. And if someone doesn't like options presented than they can just not sign the dotted line.
And I'd imagine that mothers are treated that way, because they have a child and thus can't be trusted to be as reliable or willing to work as much as a non parent. Then you throw in the maternity leave possibility and stuff and they become an undesirable employee. In the same vain, fathers are less desirable than a non parent. And then there's always age to take into account.
There's a lot going on there in the equation; not some unjust prejudice. Just people more concerned about their wallets than their employees
Edit: I do think most parents would want to take maternity leave if it was a viable option without upsetting their lives