All through the desert wanderings of the Jews, God was teaching them that obedience would lead to prosperity and blessings, and disobedience would lead to struggles, loss and suffering. The Israelites had been exiled because they were unfaithful to their Heavenly Father. Many of them had turned to other gods.