- The key founders of Russian Communism have openly declared that the Marxism and religion are „incompatible“. Namely, Marxism has declared the lines of conduct which are opposite to Orthodox Christianity, the most popular religion of the Russia;
- Marxism, at least, as it has been understood by Russian Bolsheviks, was a dogmatic, non-scientific belief, hence, a direct competitor to many world's religions of the time.
- The Russian Orthodox Church has been adopted by KGB during the times of WWII, when it became apparent that Marxist ideology is not sufficient for controlling the masses.
Yielding the Floor to an Ideologist
First, a note on terminology.
Below, the quotes mistakenly (or deliberately) mix two terms: Marxism (an ideology) and Communism/Socialism (a ruling regime, or a type of a government). The question also contains this mistake. Communism (a regime) can't oppose religion in general, but Marxism (an ideology) can.
Nikolai Bukharin, one of the key ideologists of Russian Communism and prolific author on „revolutionary theory“, wrote in his book, The ABC of Communism (1919):
Chapter 11: Communism and Religion
§ 89. Why religion and communism are incompatible
Many weak-kneed communists reason as follows: 'Religion does not prevent my being a communist. I believe both in God and in communism. My faith in God does not hinder me from fighting for the cause of the proletarian revolution.'
This train of thought is radically false. Religion and communism are incompatible, both theoretically and practically.
In practice, no less than in theory, communism is incompatible with religious faith. The tactic of the Communist Party prescribes for the members of the party definite lines of conduct. The moral code of every religion in like manner prescribes for the faithful some definite line of conduct.
As I mention in another answer, Marxism is an ideology of class supremacy. Proletariat supposed to be the "master class", while others are "lower" ones.
However, the majority of proletarians were not familiar with Marxist ideology. There was also no goal to teach them with the details of Marxism. As a result, the vast majority of them simply believed that Marxism is right without knowing Marxist ideas in any depth, just the same way as in Tsarist Russia they believed in Christianity while sincerely thinking that Jesus Christ was a Russian, not to mention the deeper aspects of Christianity.
So, there was no place for two competing ideologies, equivalent to each other in most aspects, as it was understood by the overwhelming majority of the population.
Adoption by KGB
However, in 1940s the Stalin's regime has decided that suppressing the religion is not effective:
After Nazi Germany's attack on the Soviet Union in 1941, Joseph Stalin revived the Russian Orthodox Church to intensify patriotic support for the war effort. — Wikipedia
By the last years of the „Soviet Union“,
"Not a single candidate for the office of bishop or any other high-ranking office, much less a member of Holy Synod, went through without confirmation by the Central Committee of the CPSU and the KGB" — Wikipedia
Nowadays, the KGB officer codename „Mikhailov“ is allegedly the leader of the Russian Orthodox Church.