Hatred of God should not be so intense that one closes ones ears and mind to what Rabbi's have said, which in essence, man's actions have consequences. Secondly, when hardships happened, the people in Biblical times took the opportunity to assess their own behaviors in both good times and bad. In good times, there is the luxury of having leisure to focus on parties, good times, and independent ways that please self at the expense of what pleases God. In bad times...people turn to God--and to better behavior.
Try looking at the Bible as a treatise on human behavior and psychology. When humans do this, these are the consequences. When humans do that, those are the consequences. It is no different from when humans jump off a high place, gravity pulls them down. When humans control fire, they can stay warm during cold times.
Our ancestors--of whom many dismiss as being ignorant and superstitious--knew more about humanity than we do today. The beauty of the Bible is that those who have no belief in God can easily dismiss him. The good and bad that falls upon mankind is no different from the annual change in seasons. In this season, these things happen. In that season, those things happen. No God needed, these things are the result of the earth spinning and orbiting around the sun. When mankind does this, these are the result; when mankind does that, those are the results. No God needed. And there goes your villain into non-existence.