58:10 When God judges crooked rulers by cutting them off, the upright will rejoice. David described their rejoicing in terms of a military victory in which the victors bathed their feet in the blood of their vanquished foes. This description is hyperbolic and symbolizes joy in victory.
58:11 Taking the longer view the just would find encouragement to continue trusting in the Lord because He punished the wicked rulers. They would renew their purpose to continue to obey Him.
Why did David not punish the unjust judges in Israel himself? He certainly had the authority to do so since he was the king. Perhaps he did punish them. This psalm shows that as Israel's king David looked to Yahweh as the ultimate authority in Israel. David's view of his own relationship to Yahweh was proper and admirable. Even though he had authority to punish the wicked he still looked to God as the Person who had final authority over them, and he appealed to Him to act.
Believers should pray about unjust rulers and ask God to deal with them righteously. Even when we have the authority to punish them we should still look to God as the ultimate authority (sovereign) and express our submission to His will by praying.