I think its highly reductive to look upon religion as ideology in that way, although it doesnt surprise me, it was the aim of may secularists within the socialist movement to reinvent religion, Christianity without God, and I think its reflected in the Johnny Cash song which has the lyric "they say they want the kingdom but they dont want God in it".
Its also not surprising since for a very long time, consciously and, more often, unconsciously, religion has been "commodified" or reconfigured as utilitarian for the individual or, more accurately described, consumer or only possessing value in so far as it is ulitarian or serves peoples needs or corresponds to and arises from human needs. Voltaire prefigures it all when he says that if God did not exist it would be necessary to invent God, the same could be said of religion or religious belief because those things are considered interchangeable at the time.
I think its all hugely mistaken, ethics and morality are important aspects of religion but they are possible to consider quite apart from religion, in some ways I think they ought to be, religion being a matter of private conscience and personal discipline which can not provide a social organising principle for everyone believer and non-believer alike, that's not to say I would not recommend it to all but I know I fall short and that others no doubt would too or wouldnt even want to be subject to that kind of measure in the first place for reasons of their own. There are UK athiests who curse the spread of Hebrew or Christian religion and think that the pre-Christian Greek or Roman philosophical schools of thought were and are superior and should have spread instead for the benefit of mankind, judged by their actual lights I would be wholly in agreement with them, although, as I say, that would be judged by their lights, which are not my own.