First, China is socialist, not communist. No country has ever successfully adopted a true communist government.
China allows private ownership of property and business. It allows for free market enterprise among small businesses where people are free to choose between competing dealers for the best price on goods. It allows companies to set their own wages for employees. This is socialism, where the large decisions are made by government and handed down with no voting power by citizens.
Neither socialists nor communists dislike religion. The dislike of religion comes from Lenninism. As in USSR. They believed that religion was a tool created by the upper classes to calm and subdue the working class, and therefore outlawed religion in order to help free the mind of the worker. China has never outlawed religion. Christianity, yes, but never religion.
Why did China outlaw Christianity? For one, they believed it to be a western influence on society which was to be avoided in order to promote Chinese self worth. Second, it was their belief that theirs was the correct religion. Much the same as the Roman Catholics once believed that theirs was the only true religion and persecuted those who believed otherwise.
In all reality, communism has some really great ideas. Fair, flat taxation policies; equal wages among workers; open access to knowledge and industry; the idea that anyone can be anything based only on his or her skills and not social class, race, religion, or upbringing. These are all great things. The problem with this form of government is it allows for no checks or balances against abuse by the ruling party other than violent overthrow by the workers. To ensure violent overthrow isn't possible, the ruling class then denies the working class freedom of communication, access to information, access to weapons, and wages capable of sustaining an overthrow.
The saddest part is that I see these very things happening today in America and we are allowing it to happen.
I'll take socialized medicine any day as long as it is run by people who are subject to true oversight and held accountable, including using their own socialized medicine. I would gladly live in a communist country so long as it was run by people who were subject to true oversight and held accountable. I would not choose to live in any socialist regime the world has seen so far, and I am starting to rethink my choices about this one as it moves closer and closer to a democratic socialist regime where the working class is suppressed for the benefit of the ruling class.