First, Stalin went to seminary school. Not unusual for the time and place, but he abolished the League of the Godless, was "all in" for putting laws in place to appease church values—regulating marriage in a traditional way, getting rid of divorce for women, making abortion virtually illegal, making homosexuality illegal, promoting women as baby-machines, all the stuff that the Bolsheviks deliberately snuffed out Stalin eagerly put into place as quick as he could.
When the Germans went to war with Russia, Stalin rehabilitated the Russian Orthodox Church, and the church gave Stalin the title, "the divinely anointed ruler," which is laughably un-socialist. But since he said he created socialism, despite it not arising out of capitalism, we all have to tip-toe around that and say it may have been, as "the divinely anointed ruler" said so.
Regardless, the point is that it's not really true to say that the Soviet Union was atheist—especially after Stalin bent over and smilingly reversed soviet reforms to make reactionaries happy.
Not that I think there need be a militant atheist bent to socialism. I agree with Connolly on most things:
James Connolly wrote:Modern Socialism, in fact, as it exists in the minds of its leading exponents, and as it is held and worked for by an increasing number of enthusiastic adherents throughout the civilised world, has an essentially material, matter-of-fact foundation. We do not mean that its supporters are necessarily materialists in the vulgar, and merely anti-theological, sense of the term, but that they do not base their Socialism upon any interpretation of the language or meaning of Scripture, nor upon the real or supposed intentions of a beneficent Deity. They as a party neither affirm or deny those things, but leave it to the individual conscience of each member to determine what beliefs on such questions they shall hold. As a political party they wisely prefer to take their stand upon the actual phenomena of social life as they can be observed in operation amongst us to-day, or as they can be traced in the recorded facts of history. If any special interpretation of the meanings of Scripture tends to influence human thought in the direction of Socialism, or is found to be on a plane with the postulates of Socialist doctrine, then the scientific Socialist considers that the said interpretation is stronger because of its identity with the teachings of Socialism, but he does not necessarily believe that Socialism is stronger, or its position more impregnable, because of its theological ally. He realises that the facts upon which his Socialist faith are based are strong enough in themselves to withstand every shock, and attacks from every quarter, and therefore while he is at all times willing to accept help from every extraneous source, he will only accept it on one condition, viz., that he is not to be required in return to identify his cause with any other whose discomfiture might also involve Socialism in discredit. This is the main reason why Socialists fight shy of theological dogmas and religions generally: because we feel that Socialism is based upon a series of facts requiring only unassisted human reason to grasp and master all their details, whereas Religion of every kind is admittedly based upon ‘faith’ in the occurrence in past ages of a series of phenomena inexplicable by any process of mere human reasoning. Obviously, therefore, to identify Socialism with Religion would be to abandon at once that universal, non-sectarian character which to-day we find indispensable to working-class unity, as it would mean that our members would be required to conform to one religious creed, as well as to one specific economic faith – a course of action we have no intention of entering upon as it would inevitably entangle us in the disputes of the warring sects of the world, and thus lead to the disintegration of the Socialist Party.
Socialism, as a party, bases itself upon its knowledge of facts, of economic truths, and leaves the building up of religious ideals or faiths to the outside public, or to its individual members if they so will. It is neither Freethinker nor Christian, Turk nor Jew, Buddhist nor Idolator, Mahommedan nor Parsee – it is only human.
Alis Volat Propriis; Tiocfaidh ár lá; Proletarier Aller Länder, Vereinigt Euch!