There is no way to re-phrase that question in a way that meets site guidelines and isn't based on false assumptions, and in a way that hasn't already been asked.
The root of the problem with the question is that it is based on the false assumption that "religious people" think that non-religious people can't do good things. That's utter bunk. There is nothing within Christianity that says that non-religious people can't do good, or have a "good moral code".
It's possible that people get confused because from a Christian perspective, a good moral code isn't what gets you into Heaven.
Another possible point of confusion is that the Christian perspective is that all good things come from God, that God plants a conscience within us, so even e non-religious person's morality comes from God.
The point is, that the only way you can even ask that question honestly is if you completely misunderstand central doctrines. The best we can do is to try up the misconceptions so that people asking this realize that the question is invalid in and of itself.
As an analogy, the question "Why are apples the size of an automobile in Mobile Alabama?" is a bad question because apples simpl aren't as big as automobiles in Mobile Alabama. No amount of editing to the question could make it a sensible question.
Comparatively, Christians, religious people, etc. do think that non-religious people can have a "good" moral code. No amount of rephrasing the question will change the fact that the assumption it's based on is flawed, and therefore the question isn't sensible.
If you take "why" out of the title of the question, it eliminates the issue of being based on a false assumption. But that has already been asked on the site.