I am obviously not saying that everyone exploits maternity. I'm just highlighting that there can be another side to the story. Isn't it possible that the management was already considering letting the Director of Engineering (a role that by definition is not going to have a lot of peers) go? What do they do if she's pregnant at the same time? Wait for 6 months just so they don't get sued?
EDIT: Can't respond in a reply, so I am responding here. "Exploiting a situation" doesn't mean utilizing benefits legally given to you. An example of exploiting the situation will be: My employer is required to give me paid sick leave. So, even if I'm not sick, I'll claim that I am and get paid for taking time off. And usually, it's not the employer who gets hurt by something short-term like this. It's my peers who have to pick up the slack.