When you or I get angry, it is often not for the right reasons, we lose control of our emotions and we say and do things that we should not.
God, however, never loses control of His emotions. His anger is directed at evil of any kind. When we do wrong, when we rebel against His rule, when we fail to love, trust and obey Him, when we cause suffering or hurt to other people, when we despise others. God is good. Therefore, He abhors evil.
What, maybe, we do not always realise, is that doing wrong is very bad for us. It is habit-forming, it is bad for our emotional wellbeing, it spoils our relationships (that God gave us for our blessing), it is bad for our spiritual health, and it makes an ever-hardening barrier between us and Himself.
God is angry at what we are doing to ourselves and each other, because He loves us, in the same way that a parent would be angry at a child who wastes their opportunities. He cannot simply turn a blind eye, we need our sin wiped out.
Unfortunately, we do not have the resources or the desire to kick the habit without God’s help, so God stepped into our world to intervene. God the Son, destroyed the penalty, by taking it Himself on the cross, so we would not have to. Even as He hung there He said “Father, forgive them, for they know not what they do”. That is costly love.