Marriage is a contract between two people. However it does not guarantee two people living together forever. Only love will guarantee it. Marriage will last when there is love and romance between the husband and wife.
Loving includes taking care of each other, maintaining a close friendship, and determining to live together until death.
These things are explain in the marriage sermon even though it is not written in the agreement. If couples follow this advice, the marriage will last.
All couples will face problems, but scholars say that it is a Jihad to live together while solving these problems and piously because it is not easy.