Communism had its own understanding of history, of the future, of ethics, of God, of life and of death, of humanity, and of essential meaning. In as much as it was totalitarian, it was indeed essentially religious (all totalitarianisms try to be...didn't the Nazis really "worship" Hitler?) --even if that religion was one which essentially denied the supernatural. It's focus, unlike traditional Western religions was on external, social and political life--materialist to the core, but make no mistake, for millions it was indeed the central part of their life, their reason they felt to exist. You can say it was an ecconomic theory--but it was the ultimate economic theory in that it claimed that ALL was only economics and class struggle for material gain....
Like all religions, only a relative few were dedicated believers.... many more were only nominal followers--forced into it by the revolutions which took over their countries. When it became clear that despite lofty claims--its theories didn't work--the nominal ones fell away quickly--and the true believers (generally those in power...) sought to maintain their material advantage by getting as much as they could in the collapse of the system. The Russian mafia is a good example--it boomed with former communists upon the USSR's demise--and still Russia is largely controlled by many of the same people who were in the Party--now they just party with other criminals, to the destruction of their country.