The difficulty here is that people who say so believe that whatever happens here is the direct expression of the Divine Will. However this is not the case. The Divine Will does not act directly upon the world. It pushes men and events from behind through the veil of Ignorance, taking them as they are in their present stage of evolution and works through them towards what each and the world should be. It is a long and slow process that takes into account all the forces of creation and their complex interactions that have developed in the course of evolution. It is not an arbitrary Will imposing itself upon a machine nor does It deal with robots and automatons. There is a certain degree internal freedom given to each creature to chose, to accept or reject the Divine Impulsion. If it was not so then this world would have been much better much earlier and the law of karma carry no meaning at all.
What is however true is that there is a hidden Divine Compulsion in things due to which even the worst events turn out eventually to yield some good. That is the saving Grace in creation which eventually turns even the worst towards good.
Affectionately,
Alok Da