Was this planned? I was made to feel like I needed to justify this ‘mistake’

I was in a job I loved, and with the upmost humbleness, I was pretty great at my job. When I announced my pregnancy, I was questioned that ‘was this planned’ and made to feel like I need to justify this ‘mistake’. I was very angry after the meeting with my boss, but mostly with myself, allowing myself to feel like I need to justify my life – no one has any clue the long process it took us to get pregnant, and the sadness those years brought to our life and the strain they placed on our relationship. And I should not have to share that hardship with anyone – especially not bosses who feel they need some ‘justification’. And might I add, even if I was one of those lucky few who get pregnant without hardship – it does not matter, it is no ones business but your own!
Upon returning to work – thankfully my boss has changed in that time. However, I was told that I would be overlooked for a salary increase as my new boss ‘did not have a chance to know me’. I do appreciate her honesty, but it is a load of BS. A returning mum has just as much entitlement to a pay increase than anyone else, and if you don’t have the information as a boss, then it is your job to find it!