One of the questions I have heard quite often is "Why was God so angry in the Old Testament?". The people who ask this usually compare God from the Old Testament with God as preached in churches today - angry, jealous, and vengeful versus loving, caring, etc. Is there any way to explain why God seems to behave so differently between the New Testament and Old Testament? Yes, there is - it requires an explanation of "dispensations". Dispensationalism explains why God appears to act differently towards humanity throughout history, and explains why God was harsh with Israel in the Old Testament.
What is Dispensationalism?
Dispensationalism is the idea that God deals differently with humanity in different periods of time. Throughout human history there have been different "dispensations", and humanity has related to and known God slightly differently in each one. Each dispensation follows the same pattern: a new revelation from God to humanity, testing of humanity, humanity fails, and God judges humanity. The revelation from God to humanity includes new responsibilities on our part, as well as promises from God to help us do what is asked [1, p.57-58]. In changing from one dispensation to another, some rules may stay the same, some new rules may be added, and some rules may be removed. For example, in the switch from Old Testament to New Testament we no longer have to follow the Mosaic Jewish laws, but we are still expected not to kill, not to steal, etc. An important point made by Hal Lindsay about dispensations is that the method of salvation does not change - only the way we are expected to act and follow God has changed [1 p.59]. A person has always and will always be saved only by faith in God/Jesus.
Summary of the 7 Dispensations
To get a better idea about dispensationalism, lets look at each of the 7 dispensations that will cover all of humanity's history from Adam and Eve up to the Great White Throne Judgement. The information here is a summary of [1 p.60-79] and . I would suggest reading  as it brings up other points I did not mention here.
When God first made Adam and Eve, they had free will but had not yet sinned. God let them live in and care for the Garden of Eden with only one rule - to not eat from the Tree of Knowledge of Good and Evil. God interacted personally with them, even walked in the garden with them (Genesis 3:8). But Adam and Eve gave into temptation, disobeyed God and ate from the tree. As punishment, God curses all of creation and kicks Adam and Eve out of Eden. From then on, humanity has had to deal with sin, death, sickness, and decay in nature.
After Adam and Eve left Eden, God let humanity spread and they were guided only by their consciences. But this didn't work so well as people can easily justify their negative actions. This lasted up until the time of Noah, where "The Lord saw how bad the people on earth were and that everything they thought and planned was evil." (Genesis 6:5). The only person God found was acceptable was Noah, and so God instructed him to build the Ark to save his family and some animals. Then God punished the rest of humanity by wiping them out with the flood.
After the flood, God makes a promise with Noah to have lots of kids and to spread over the whole earth. Noah was also given the authority to kill animals or humans who attack any other humans. This time of human rule didn't work so well either, and just a few generations later the Tower of Babel was created. Here people decided to stick together and not spread out like God had commanded (Genesis 11:1-9). So God judged them by giving them multiple languages so they couldn't work on the tower, and had to leave and spread out again.
An interesting side note - Hal Lindsey and Jack Kelley suggest in  and  that the people who lived at Babel were using the tower as protection from another flood, and also to study astrology which was against God's will.
Israel Under Promise
Instead of making promises to all humanity, now God decided to make a covenant (an unconditional promise) with Abraham that God would give Abraham tons of descendants and would become a great nation, and would bless all humanity through Abraham's family (Genesis 12:1-4). Hal Lindsey in  suggests these very good promises were given as encouragement to follow and trust God.
Abraham became wealthy and had large amounts of land. In order to become a great nation, Abraham had to have kids, but his wife Sarah was barren. Abraham didn't believe God could give him and Sarah a son, and had a child with Sarah's servant Hagar instead. Later God did give Abraham and Sarah a son named Isaac, and continued to pass his promise of blessing in return for faith down through Isaac's descendants. However Isaac and Abraham's first kid Ishmael ended up hating each other.
Ishmael's descendants became the Arabs, who hate and hassle the Jews (Isaac's descendants) even up until now. It seems though that the Israelites eventually lost faith in God's promises, and at the end of this dispensation the Israelites ended up as slaves in Egypt.
Israel Under Law
The dispensation of Law began after the plagues of Egypt and the parting of the Red Sea, and the Law was given to Moses at Mount Sinai by God (Exodus 19). The Law was given to show the Israelites the things they were doing wrong, and was intended to teach them to have faith and to obey God (Galatians 3:17-25). Hal Lindsey in  says that the Law was given to show humanity's rebellious nature and show that no one can avoid sin. The Law and the constant failure of the Israelites clearly shows people cannot earn their salvation and must turn to God/Jesus to be saved.
It's important to note that God did not unwillingly impose his Law on the Israelites - they volunteered for it and said "We will do everything the Lord has commanded." (Exodus 19:8). They thought they could be good enough to earn God's promises, but they failed just a few days later when Moses came down from the mountain and found them worshiping a golden calf (Exodus 32). Throughout this dispensation, failures usually ended up in being invaded by various other countries, but obedience was rewarded with prosperity.
Finally when Jesus came to fulfill the Law (Matthew 5:17-18), he was rejected by the Jews and crucified. As punishment, in AD.70 Israel and Jerusalem were invaded by the Romans and the Jews were spread over the whole earth. Since Jesus was rejected 7 years before the end of the dispensation of Law, there will be the last 7 years during the upcoming Tribulation, giving Israel one last time to try to follow God's rules.
This is the current dispensation, which began after Jesus was crucified and set up the early Church. People no longer have to follow the Old Testament laws that were made for Jews, and only have to have faith that Jesus' death paid for our sins.
Hal Lindsey in  says that God had planned all along to create the church, but kept it a secret, because only God knew that the Jews would reject Jesus. If he had told the Jews ahead of time, they would have known that they would fail and would not have even tried to follow God's laws.
In the dispensation of Law, God was inaccessible except for a few times a year, and only to the high priest. Now, any Christian has direct communication with God, and is personally filled with the Holy Spirit to help us follow and serve God. We can be accepted by God only through faith, and by this faith God will reward us with eternal life and blessings in heaven.
However, most people for the last 2000 years have rejected Jesus and God's gift of free salvation. At the end of this dispensation will be the Tribulation and the last 7 years of Israel Under Law. The Tribulation will be the worst judgement yet on humanity, but fortunately all who accepted God under the dispensation of Grace will be evacuated beforehand in the Rapture. I and many other scholars of Biblical prophecy believe the Tribulation may be coming very soon, perhaps in the next few years.
The Millennium dispensation will be a time of amazing blessing, and will last for 1000 years. After Jesus returns at the end of the Tribulation, he will set up his government with the Church, will throw Satan into supernatural jail, and will rule the whole earth personally. The earth will be restored and fixed up nearly back to what it was in the Garden of Eden. Animals will no longer kill and eat others, and it will be much easier to grow food.
You'd think this would be the ideal situation for people to follow God. However, the Bible says that people will fail again. Even though everyone at the beginning of the Millennium will be Christian, the Bible says at the end of the Millennium that most people will have rebelled and under Satan's leadership will attack Jerusalem to try to overthrow Jesus' government.
The Millennium ends with God throwing Satan and the demons into the lake of fire, and starts the Great White Throne judgement of all unbelieving humans. After this, there is eternity where God will rule forever on earth with everyone who has ever followed him. It will be even better than the Millennium or the Garden of Eden.
Why does God use Dispensations?
Dispensations are very useful for humanity to learn from. It shows that under all sorts of different conditions and rules, humanity is constantly sinful and will always rebel against God. It proves that the problem is with us, not with our environment or lack of God's visible presence. It shows that no matter what, people must turn to God to live right and to have a proper relationship with Him. Otherwise all we get are problems.
In  Hal Lindsey also suggests that dispensations also are good to prove to the angels that God is loving and infinitely patient, and that the demons and Satan were wrong to rebel against God.
So Why Was God So Angry under the Dispensation of Law?
So now after we have learned about dispensations and why God uses them, let's get to the point of why people claim God was so angry and unfair during the dispensation of Law. They claim that if God really was so loving, etc. that then he wouldn't have punished the Israelites when they failed to live up to the rules, wouldn't have commanded them to kill other neighboring tribes, etc. But this doesn't really make sense. As we have seen, God allowed the Israelites to accept their rule under Law.
In any Law, there must be consequences to following or not following it. Otherwise it would be meaningless. It would be like a parent who sets a curfew for their teenager, the teenager agrees, then disobeys, and the parent refuses to discipline them. Parents enforce rules because they know it is in the kid's best interest. Not having consequences to teach them to follow the rules will just end up with the kids running wild and hurting themselves in the future. God already gave humanity chances to do whatever they wanted without penalty in the dispensations before Law, and it failed every time.
But still, the penalties God created may seem harsh. In Leviticus, God prescribes various punishments such as death, stoning, and throwing the Israelites out of their land (usually by invasion of another army). Other times God uses natural disasters, famines, etc. to punish them when they are disobedient. God also sometimes told the Israelites to invade and kill the surrounding foreign tribes for their disobedience. I believe God punished the other tribes because the tribes had already failed under the dispensation of Human Government, and it made an example to the Israelites of what would happen to them when they failed to follow God. Additionally, it protected the Israelites from being wiped out by hostile enemies. I have heard others say that even though it seems harsh, the commands to wipe out even the women and children of tribes do make sense. The women were the main cultural teachers, and leaving them alive would let the tribe spring back up or they might teach the Israelites these wrong ideas. By killing the children before they reached the age where they can choose to follow God or not, they automatically go to heaven. If they had grown up they would most likely been corrupted by the womens' teachings and gone to hell when they died. So in that sense it was a merciful thing to do, although we don't understand it in our culture today. (Side-note - this does not justify abortion).
A good story that demonstrates why God was so angry with the Israelites when they disobeyed him can be found in Ezekiel 16:2-42. Here God compares Israel to a young baby who he finds and takes care of and the baby grows up into a young woman. God gives this woman all the nicest food, clothing, and made her even more beautiful than she was before. But then the woman notices her blessings and uses them to have sex with other foreign men, and uses her clothes and jewelry to decorate idols' shrines. She doesn't even want to be paid for her prostitution because she enjoys it so much. God calls Israel an unfaithful wife, and is disgusted at her behavior. Then God decides to punish her by allowing the men she slept with to take her treasures and kill her. After reading this story it demonstrates how God viewed Israel's rebellion. God had created, taken care of, rescued, and blessed Israel so many times, and they continued to rebel and adopt practices of neighboring tribes. It is understandable why God is angry with Israel after all of this.
As we have seen, God had set up dispensations to deal with humanity in many different ways over history. Each time, humanity fails, and God tries another method to teach humanity to follow him. However, even in the best possible conditions, people will always sin and rebel against God. In the dispensation of Law, God was very harsh with the Israelites and became angry when they constantly disobeyed him after all God had done for them.
Fortunately, we no longer live in under the Law, but under Grace. It is so very easy now to know God personally. We just have to accept Jesus' sacrifice on the cross and have faith in him. This gives us the blessings of the Holy Spirit, a personal connection to God, and the promises of not only being rescued from going through the Tribulation - but of being on earth during the Millennium and with God in eternity afterwards. It's an amazing gift that God gave to us, and it is free to accept. How much simpler could God make it? I hope you will consider accepting God's offer, if you have not done so already.