In his Systematic Theology, 19th C. theologian, R.L. Dabney, provides two helpful illustrations explaining how our infinitely good God can at times, for reasons left unknown to us, constrain the excellencies of his love for purposes of greater good. In the first illustration, he writes,
“For instance a philanthropic man meets a distressed and destitute person. The good man is distinctly conscious in himself of a movement of sympathy tending towards a volition to give the sufferer money. But he remembers that he has expressly promised all the money now in his possession, to be paid this very day to a just creditor. The good man bethinks himself, that he “ought to be just before he is generous,” and conscience and wisdom counterpoise the impulse of sympathy; so that it does not form the deliberate volition to give alms. But the sympathy exists, and it is not inconsistent to give other expression to it. We must not ascribe to that God whose omniscience is, from eternity, one infinite, all embracing intuition, and whose volition is as eternal as His being, any expenditure of time in any process of deliberation, nor any temporary hesitancy or uncertainty, nor any agitating struggle of feeling against feeling. But there must be a residuum of meaning in the Scripture representations of His affections, after we have guarded ourselves duly against the anthropopathic forms of their expression.
Hence, we ought to believe, that in some ineffable way, God’s volition, seeing they are supremely wise, and profound, and right, do have that relation to all His subjective motives, digested by wisdom and holiness into the consistent combination, the finite counterpart of which constitutes the rightness and wisdom of human volition. I claim, while exercising the diffidence proper to so sacred a matter, that this conclusion bears us out at least so far. That, as in a wise man, so much more in a wise God, His volition, or express purpose, is the result of a digest, not of one, but of all the principles and considerations bearing on the case. Hence it follows, that there may be in God an active principle felt by Him and yet not expressed in His executive volition in a given case, because counterpoised by other elements of motive, which His holy omniscience judges ought to be prevalent.”
“Oh, the depth of the riches and wisdom and knowledge of God! How unsearchable are his judgments and how inscrutable his ways! For who has known the mind of the Lord, or who has been his counselor? Or who has given a gift to him that he might be repaid? For from him and through him and to him are all things. To him be glory forever. Amen” (Rom 11:34-36).
 R.L. Dabney, Systematic Theology (1878; reprint: Carlisle, PA: Banner of Truth, 1985), 530.