C.s. Lewis said this quote

God's will is determined by His wisdom which always perceives, and His goodness which always embraces the intrinsically good. But when we have said that God commands thing only because they are good, we must add that one of the things intrinsically good is that rational creatures should freely surrender themselves to their Creator in obedience. The content of our obedience - the thing we are commanded to do -- will always be something intrinsically good, something we ought to do even if (by an impossible supposition_ God had not commanded it. But in addition to the content, the mere obeying is also intrinsically good, for, in obeying a rational creature consciously enacts its creaturely role, reverses the act by which we fill, treads Adam's dance backward, and returns.