While the incidence of actual sacking for pregnancy is likely to be quite low (because the employer faces a risk of legal action) it is certainly true that employers are less inclined to employ women because of the so called 'anti' discrimination laws.
The 'anti' discrimination legislation makes employing a women more risky than employing a man - the risk of having her taking maternity leave is higher. Losing a staff member for several months, and then to have the obligation to re-employ them after training someone else to do their job is a big cost to a small business. Women also find it easier to make claims of unfair dismissal - the possibility of being falsely sued for unfair dismissal is a terrifying prospect for a struggling small business. Their solution is to quietly employ men instead of women, or to factor the risk into a woman's wage and pay her less.
Imposing legislation to ban this is pointless. The job-interview and selection process is vague enough to disguise it - 'she didn't have quite the right skills', 'our needs changed after we gave the interview' and so on.
If there were no such legislation, then women would get more, and women who choose not to have children would not suffer because of (or effectively subsidize) those who did.
This is an example of feminists trying to get the rest of the world to subsidize their chosen lifestyle.