Explain to me how it is any different to the person who get a job knowing that in 4 months time they are emigrating, or moving to the other end of the country, or their partner's will change making the job impossible.
Explain how it is different to a person taking a job as a CV filler, or a stepping stone.
Explain how it is different to taking a job because the pension is good, or the sick pay is good, or there is the possibility of funded Masters degree, or term-time working.
It isn't. People take a job because it is attractive to them. For whatever reasons meet their needs at the time.
People are criticised on here for not considering their finances before having children, yet when someone considers their finances, they get slated.
I am in the lucky position of having 'employed time' accrued, having been on unpaid mat leave. I could get a job for 13 weeks, paying £120 per week, and then qualify for the full Maternity Allowance package.
Doing the maths, that is a 300% return on my 'investment' of working. Sounds pretty sensible doesn't it? (I am unlikely to do so because I have 2 DDs under 3 and would find it pretty exhausting to work every evening for 3 months, but it would be my right to do so.)