Sometimes, yes.
Is this an action of a Just God?
It all works out for the best in the end. Who are we to question God?