A righteous God will do as he pleases
Fortunately the God of the Bible has a loving forgiving nature
Tell that to the Amalekites.
God defies definition. God is merciful but only to those who receive His mercy.