all to the good

all to the good

for the best; to one's benefit. He missed the train, but it was all to the good because the train had a wreck. It was all to the good that he died without suffering.
See also: all, good