Good grief man. Let us rephrase it again.
Regardless of religion, nice people will do things thinking they are doing good (which is accurate), and bad people will do things thinking they are doing evil (again, accurately).
But because of religion (actually, quasi-religious groupthink, to accept the previous amendment), nice people can be fooled into doing evil things thinking they were doing good things.
Is that any clearer?
You forgot in the first park that because of religion, good people will do good. And that is where the problem lies. You are saying that religion causes good people to do good then you are saying that religion causes good people to do bad. You can't have it both ways.
Actually: yes, you can. The quote is saying that religion can make good people do good things... the same things they'll do without it (be kind, be generous, be selfless). But religion can also make good people do evil things, things they wouldn't normally do, because they think they have to follow the letter of some ancient collection of myths or they will be damned to an eternity of torment.
Now, do you realize that instead of trying to understand what's written, you are clinging to the wording so you don't have to think about the meaning?
Kinda like what you do with your Bible.