I don't think god exists, and I'm glad that god doesn't exist. I think living in a universe without god is better than living in a universe with god (all else being equal).
Most theists are glad that god does exist. They'd prefer the universe with god to the one without him.
It seems like there are very few people who believe one way, but think the other would be better.
So, is this correlation, or causation, and if it's causation, does the belief cause the attitude, or does the attitude cause the belief? I'd speculate that it's some of all three.
Both elements are probably largely influenced by the same outside sources. For example, most of what people believe about god and religion comes from their parents. So, both the belief about god and the attitude toward god will be picked up.
Humans are terribly prone to magical thinking, so the attitude definitely helps foster the belief. If you think something is good, you're more likely to believe that it's true too and the opposite.
And humans also prefer what they have to what they could have. If you've already concluded one way or the other, since there's no way to change it, you'll convince yourself that whatever you have is best. The theists will be more likely to ignore that bad things about god, and the atheists will be more likely to ignore the good things.
It's interesting, and I think it serves to both highlight our cognitive biases and demonstrate just how little actual evidence there is either way. People believe things they don't want to all the time when there's good solid evidence for it. I don't like high murder and rape rates, but I believe them.