The edumacated liberal wing of the party is atheist (having "moved beyond" the "superstitions" of their parents) but they permit him to shuck and jive for the masses in flyover country (as Ubama explained to those at the California fundraiser) who "cling to religion" to secure a majority vote support.
Pelosi herself explained the need to "close the God gap" after the Democrats lost in 2004. They cloak the rhetoric of Socialism under the language of religion. The policies are already decided, it's just finding the quotes to back up the policies.