All to the good

For the best, for one’s benefit.

It was all to the good that my sister quit her job.