Thomas Aquinas said this quote

God loves his creatures, and he loves each one the more, the more it shares his own goodness, which is the first and primary object of his love. Therefore he wants the desires of his rational creatures to be fulfilled because they share most perfectly of all creatures the goodness of god.And his will is an accomplisher of things because he is the cause of things by his will. So it belongs to the divine goodness to fulfill the desires of rational creatures which are put to him in prayer.