God is perfect. Perfection essentially means that God contains every good quality, such as mercy and justice. God is also infinite, so that he contains these good qualities without limit. There is no limit to his mercy and love, and there is also no limit to his justice. He taught the Israelites (and us!) which sins bring spiritual death, separate them from God, and offend God the most. They learned through experience that certain sins would bring large scale temporal consequences; for instance, the plague of snakes within their midst, or the sins which expelled the original inhabitants of Canaan. That is why God is wrathful and strong in his decrees concerning sin: sin is offensive to God, deadly to our souls, and inflicts temporal punishments far beyond the confines of the sinner.
God is love, but he also has wrath and justice which is not contrary to love but rather serves its ends for our own good. This does not contradict his mercy. Mercy can’t overturn justice, but only temper it. Thus God, through his mercy, can pardon the eternal consequences of our sins and inflict the lightest punishment due to them, rather than the heaviest. We can further turn away the temporal punishments through acts of penance, and the use of indulgences.
So, in essence, God seems angry with regard to sin because he is. He is our Heavenly Father, but also our Just Judge, and we should seek to no longer offend him by our transgressions. If we do, his justice is tempered through his mercy and we are given the means to obtain forgiveness and make reparation for the real effects of our sins, but we should never think that our sins are without consequences.