The policies of the Soviet state towards religion can be traced to several sources. Before the Revolution, church and state were intimately connected. On the one hand, Russian Orthodoxy was the official state religion, but on the other, the church was also under many restrictions by the government. Still, the Church had much power and wealth, which meant it was a good target for the Bolsheviks both as a symbol of the old regime and as a source of revenue.
As a philosophy, Bolshevik ideology came out of the tradition of Marx and 19th century materialism, which considered religion to be the "opium of the masses." There were therefore philosophical reasons as well for the new state to be opposed to religion. The combination of these factors proved extremely dangerous for the church. Confiscation of church property led to conflicts and even the arrest of the Patriarch in 1922. Some property was seized on the pretext of famine relief; this way the state gained financially, while the church would be disgraced by any resistance.
One decree of 1929 stipulated that every religious association must be registered with secular authorities, which could require control. In the same year the government revised the constitution to guarantee freedom of worship (instead of freedom of religion) and permit only anti-religious propaganda. Religious propaganda remained unconstitutional in the Soviet Union. Church buildings were either destroyed or converted for use as warehouses or stables. Most of the ancient churches in Moscow were still housing cartoon studios and metal shops into the 1980s. The largest church in Moscow, the Church of Christ the Savior, was blown up in 1931 to make room for a projected Palace of Soviets. When the ambitious project could not be completed, a swimming pool was built where the foundation pit had been dug. After 1991, the Moscow government began rebuilding the church.
For more on Soviet Antireligious campaigns, see the Library of Congress Soviet Archive Exhibit.