The people in these stories from the Old Testament believed, that if they obeyed God, He would help them and take care of them but if they disobeyed Him, they would be punished.