What most literal and YEC creationists don’t seemed to understand that Charles Darwin have always been a Christian, though in later life, he has a leaning towards agnosticism, not towards atheism. Despite his agnosticism, he was still a Christian.
His background is that of Anglican and Unitarian, due to his parents. In his letter written in 1879, he rejected the idea that he was ever an atheist.
Many of his Darwin’s contemporaries, in the science circle, were mostly of Christian backgrounds, and their beliefs didn’t interfere much on their own works in science. And most of them accepted Natural Selection.
But whether it be Christians, atheists or agnostics, none of these groups have to do with evolution being a science in biology.
You are right, evolution has nothing to do with atheism.