An overly narrow view. A predictably potential rapist who was subsequently convicted would become permanently unavailable and and could bring down a huge liability on an employer. An employee who gives birth (or who becomes a father) is engaging in normal human activity; you treat that the same way you treat any other indisposition like an unexpected health condition, and hedge against it.
Really, ask yourself how you'd feel if a prospective employer or business partner said 'Joe, what assurance can you give me that you're not going to knock your wife up and go all googly-eyed over some squalling infant a year from now? Can you commit to tying a knot in it?'
Statistically, there are equally-qualified candidates with none of these problems. A moral-free algorithm would surely choose young unmarried technologists over any other kind. I'll repeat: the trouble with discrimination is, it works so well.
Really, ask yourself how you'd feel if a prospective employer or business partner said 'Joe, what assurance can you give me that you're not going to knock your wife up and go all googly-eyed over some squalling infant a year from now? Can you commit to tying a knot in it?'