But you, O God my Lord,
deal on my behalf for your name's sake;
because your steadfast love is good, deliver me!
God does what He does because He is Who He is. And the best motivator that a holy, perfect God has is His own glory. It would be sin for us to be so self-driven in our motives because we are unholy by nature. But since God is perfect and holy, He is holy when He does what He does for His own name's sake.
King David knew this about God. That is why he so boldly prayed for God to act for him for God's name, not for David's. He knew God was holy and faithful in His love. Hence it is a perfect and holy thing for the God Who loves us to help us so that He might be worshiped as mighty to save.
Yes, Lord, You are perfect, right, and good. Do for me only what will bring You glory. Do to me what magnifies Your holy name and Your faithful love. Make much of Yourself in me as I trust in You, O God, my deliverer.