A woman doesn't have that possibility, so enabling that also encourages discrimination.
The disadvantage women have is that they can't hide a pregnancy forever. Men can go to extreme lengths to hide their relationships. Although rare, it is not unheard of for a man to have two families at the same time, each one hidden from the other, and maintain this state of affairs for years before getting caught (otherwise we'd never hear about it).
Also multiple marriages are illegal in Western countries.
The fact is, an employer has no right to know what, if any, relationships the employee has, let alone the pregnancy status of them.
The fact that employers discriminate against pregnant employees is the problem we should be addressing directly.