It's because before you have kids, things are often quite separate anyway in a relationship. You can rub along quite happily doing your own thing. The problem is that women often have this expectation that when children arrive, both parents will pull together and approach the situation as a team. Whereas men often have the expectation that life will continue just as before, but there'll be a baby around, a bit like they've got a pet hamster or something. These expectations aren't compatible and so you end up with friction. But each person thinks it's so obvious that it doesn't have to be discussed, and therefore it comes as a big surprise. The woman feels hard done by because she's doing everything with no support. The man feels hard done by because he's being asked to do more than he thinks is reasonable, especially if he has already offered some help with what he doesn't really consider to be "his job". I don't know where this male expectation comes from, BTW - bringing a child into the world is a serious responsibility/decision, so nobody should ever just be thinking oh I'll carry on like I always have. But probably patriarchy (hence my single word response earlier!) or a sexist belief that women look after children, possibly total naivety (although let's be honest, it's monumentally stupid to assume a completely dependent, immobile, infant child that needs to progress through at least 18 years of development before being considered independent, is not going to be any work to look after).
What can help is well before you get pregnant, have the discussion about expectations, and really get into nitty gritty details. Undertake some kind of project together, just to see what it's like - planning a wedding is a conveniently traditional one - and observe whether he's participating and approaching everything as a team, or just letting it passively happen around him or having to be cajoled into everything or nagged to make a decision ("I'll just turn up on the day" - not really a joke, is it?) - unfortunately, since the wedding industry is just as sexist and there are cultural tropes galore, it can be common for the bride to be organising and deciding everything, and nobody questions this because women supposedly care more about weddings. So unless you already have this idea to see the wedding planning as a kind of trial run for any joint project including parenthood, you might miss this red flag. (Planning a holiday, decorating a house, or some other DIY project are some less-expensive and less-drastic ones than a wedding, BTW.)
It's not always obvious, not until you're in the middle of the situation and then it's too late. You can't un-have the baby, and you probably don't want to anyway! But it's very very hard to change someone's mindset and expectations from where they were originally. He's always going to feel hard done by, he's always going to feel it wasn't what he signed up for.