The God of the Hebrew Bible is like an abusive husband. God didn't want Israel to do well without him or be independent of him and punished it when it tried.
Amos Chapter 4
6 “I gave you empty stomachs in every city and lack of bread in every town, yet you have not returned to me,” declares the LORD.
7 “I also withheld rain from you when the harvest was still three months away. I sent rain on one town, but withheld it from another. One field had rain; another had none and dried up.
8 People staggered from town to town for water but did not get enough to drink, yet you have not returned to me,” declares the LORD.
9 “Many times I struck your gardens and vineyards, destroying them with blight and mildew. Locusts devoured your fig and olive trees, yet you have not returned to me,” declares the LORD.
10 “I sent plagues among you as I did to Egypt. I killed your young men with the sword, along with your captured horses. I filled your nostrils with the stench of your camps, yet you have not returned to me,” declares the LORD.
11 “I overthrew some of you as I overthrew Sodom and Gomorrah. You were like a burning stick snatched from the fire, yet you have not returned to me,” declares the LORD.
12 “Therefore this is what I will do to you, Israel, and because I will do this to you, Israel, prepare to meet your God.”
13 He who forms the mountains, who creates the wind, and who reveals his thoughts to mankind, who turns dawn to darkness, and treads on the heights of the earth— the LORD God Almighty is his name.