Yeah, so was I.
Yes, there are times when divorce is better and of course it needs to be handled gracefully for the sake of the child. Divorced or not, the kid needs to see two adults who have regard for each other’s feelings and thoughts and who can communicate directly and be receptive and respect one another. If the expectation is that the marriage isn’t to fail(which, why would you get married if you didn’t want it to work?) and they need to stay together and raise the kid, then the husband and wife absolutely need to prioritize each other’s needs.
Yes a child’s needs absolutely need to be met. Everyone’s needs in a family are important.
The marriage still needs to be tended to.
A person doesn’t stop having needs and stop being a human just because they became a parent. People lose their identity when they have kids and society pushes this idea of “well that’s how it is”. The usual result is one or both of the parents becoming miserable, a failed marriage/relationship, affairs, dead bedrooms, regret(which many parents don’t want to hear or talk about but is real), sadness or depression, apathy etc. Why would anyone want to accept living like that?
If two people who desire to get married and raise a kid together, can’t manage to meet everyone’s needs, they should reconsider having children.