God is necessarily good in regard to His nature, but freely good in regard to how His nature flows out to this or that particular object.
It is agreeable for the highest good to be absolutely free to dispense His goodness in what methods and measures He chooses, according to the free determinations of His own will. He is guided by the wisdom of His mind and regulated by the holiness of His nature. “He will answer none of man’s words”. (Job 33:13). God said to Moses, “I will have mercy on who I have mercy, and I will have compassion on whom I have compassion”. (Romans 9:15). When He acts, He cannot but act well, so it is necessary. Yet He may act this good or that good to this or that degree, so that it is free. As goodness is the perfection of His nature, it is necessary. As goodness is the communication of His bounty, it is voluntary.
From the book Boundlessly Good