I've never been married, so I don't really know how these things really work, but I am led to believe that your suggestion is one of those "works in theory" things...
I've been married 24 years. It works in practice, too. But it helps to marry somebody with similar values.