As a Latter-Day Atheist (I didn't come to my full senses until middle-age) I see gods as inventions of the overactive human mind being in contemplation of the unknown. The overtly pious are apt to be scared of what the future (or lack of it) holds for them so they are more than willing to grasp at straws, which are in the form of imagined gods and the imagined afterlife.