LondonMan if she did do this on purpose to get pregnant, no, that's not okay. We don't know that's the case though, it's just the OP's assumption.
If it is the case, nobody is saying that she was right or that he deserves all he gets, but he choose to take zero responsibility for his own protection and so has to face that now.
He's old enough to understand that if a woman becomes pregnant, even in a casual sex FWB relationship, and he is the father, she is the one who gets to decide what to do about the pregnancy from that point on.
And if she decides to keep the baby when he would prefer her to terminate, then he is going to be held accountable, financially and otherwise, whether he likes it or not.
Which is why he should have done everything in his power to prevent a pregnancy while he still had some control over it. And worn a condom. Because now, no matter what her motives were, no matter what she planned or said or didn't say or even if she just thought it was a safe time of the month, it's not up to him anymore.
If you have a STI you know there is no safe time to have unprotected sex and you should disclose it to everyone you have sex with even if you use protection. But there are times when you are less likely to conceive and might assume it's 'safe' to have unprotected sex.
But again, why his his assumption less unreasonable than hers? Why can's she assume he's had the snip or is infertile or will pull out without ejaculating etc or that she is in a 'safe' point of her own cycle?