What is the meaning of [hanging and wiving go by destiny]

Some people are fated to marry each other, just as some are fated to be hanged.