Totalitarians cannot tolerate the free exercise of religion. As so many disillusioned communists in the last century observed, communism, to its disciples, is a religion and a god. One well known book, a collection of the writings of a number of former communists, is called simply The God That Failed. Anyone who has attempted to discuss a subject intelligently with a communist quickly grasps that he is talking to a follower of a secular religion.
Sometimes communism has entered into a truce with faith or has loosened the chains on religious people for tactical reasons. During the Nazi invasion of the Soviet Union, for example, the churches opened again and allowed people to worship without duress. That limited freedom disappeared after the Nazis were defeated. The Soviets also pretended to respect the rights of Jews to worship, although in actual practice Judaism was suppressed (Hebrew, for example, was forbidden while Yiddish, a secular language, was encouraged).
Why the fear of religion? As men such as Aleksandr Solzhenitsyn knew, faith in the living God reduces all the powers and principalities of man to dust. All things pass but God.