It's because people are afraid of dying and all the horrible things that can happen to them in life. Placate these vengeful gods with worship and you might get on their good side, although they may make things hell for you, anyway.
There's also the afterlife which is a later innovation (as far as peasants are concerned, thought I'm simplifying a bit here), and the thing the afterlife does is promise you that you are going to get good things eventually as long as you worship and do what God wants. Even if you have a lot of things go wrong for you on Earth, there's always heaven. This change must be extremely useful in retaining followers; it gives the people who suffer misfortune a good reason to stick with it. For example, if you were crippled and made into a beggar because you can no longer harvest grain, you still have this sweet afterlife waiting for you. Another plus, being disabled is now something that can be blamed on the Devil. This is important because it means God gets to stay a great guy even though this is the world he created. Earlier, when there wasn't a Devil, God was responsible for those kinds of things. Presumably, this kind of thing would have interfered with his popularity. This is why you need a Devil to have a benevolent God. Otherwise everyone would always be grappling with the issue of theodicy (paraphrased: if God is so good, all-powerful, and all-seeing, why does evil exist?) because it would be too hard for anyone to ignore. "Wait, I thought God was good, and could see and do everything. So why did I break my wrist before I was about to have my first date with my crush? It turned out to be my one chance! I do all the things he wants me to do. Maybe he's not that good. " If you have a devil who you're constantly warning about in sermons and adding in all this additional lore about (since there's not actually that much about the dude in your holy book), only theologians have to worry about it. The poor romantic gets to blame it on the devil and not worry about it.