The question is explained in Psalm 26 by David.
Psalm of David. To You, O Lord, I call: my fortress! Do not be silent to me, lest in Your silence I be like those who go down to the grave.
Hear the voice of my prayers when I call to You, when I lift up my hands to Your holy temple.
Do not destroy me with the wicked and with those who do not tell the truth, who speak peace to their neighbors but have evil in their hearts.
Give them according to their deeds, according to their evil actions; give them according to the work of their hands, give them what they deserve.
Because they are careless about the Lord’s actions and the work of His hands, He will destroy them and not build them up.
Blessed be the Lord, for He has heard the voice of my prayers.
The Lord is my fortress and my shield; my heart has trusted in Him, and He has helped me, and my heart is rejoicing; and I will glorify Him with my song.
The Lord is the fortress of His people and the saving protection of His anointed.
Save Your people and bless Your inheritance; guard them and exalt them forever!
Psalms, Chapter 27, Psalm 26 (translated from the Russian Synodal).

