Because it doesn't last forever. Never a truer word was said than that the days are long but the years are short.
When you're some way out of the stage you're in now, it's possible to simultaneously remember how bloody awful it was but that in hindsight you also can't believe it passed so quickly when it really didn't feel like it at the time. I think it's because between years 2ish and 5ish they change so, so much. They do too between 0 and 2, but not in a way that's relatable to as an adult. Plus, they're still dependent on your for absolutely every little thing.
Once they're 5ish, and frankly out of your house and hair when they're at school, you regain a sense of yourself some more. It's easy to contextualise how shitty life can be when it's almost 100% focussed on one thing (your child). You get some balance back, and that makes even the worst times easier to handle. You get an inkling of this when they start going to nursery or pre-school for a few hours a day, and that's when you wonder if you should have another!
And then, once they start secondary school, it's possible to feel that you want time to stop with the very baby you wanted time to speed up for. You can't get enough of them and it's unspeakably sad that they're growing up so fast. The rate of change increases, time speeds up.
It's unfair to say "don't wish it away", that denies just how awful the early months and years can be. But the one element of that I do agree with is that if you wish it away you're also hurrying along the good years. For me, these good years are what I went through all that horrific time for. I'd do it all again in a heartbeat if I could.