means that
marriage involves uncertainty because no one can fully predict how a spouse or the relationship will develop.
The saying “Marriage is a loottery” can be used when one can never tell beforehand what sort of partner one’s spouse is going to be.