It of course helps if both the partners are on the same path and have the same goal. It creates a bonding at the deepest level and holds them together despite the rubbings of the ego. But marriage is much more than walking together. The joy of togetherness comes when there are affinities, commonality of ideals, shared thoughts and feelings building a long term companionship, mutual care and respect, complementary of life, and many other things.
Being behind or ahead is rather difficult to say since true spiritual life moves along several lines like people walking to the same peak on the same mountain but from different routes. It is not of so much importance but yes, if they share the same pace and are at the same stage of inner development then the mutual understanding can be very deep and complete creating the perfect condition for being together.