The ethical choice is the most logical choice when considering all available information. When you only consider an issue from a narrow point of view or perspective, you will often reach the most unethical and illogical conclusion. If your ethics are mismatched with the rest of society, you will not agree with the rest of society. If you live in a narrowly focused society, your ethics will not be logically in sync with the world outside of it. Logic and ethics do not exist in a bubble. Your personal ethics must be as flexible as your logic. You cannot ignore the world at large.
When I have made questionable ethical choices, I am usually focused on a singular goal that is guiding my decisions. If I am weaving in and out of traffic and cutting people off, I am focused more on being late than on making logical driving decisions. If I flip someone off and yell at them for driving badly, I am focused more on the instant reaction than whether flipping them off will help the situation. It is most likely not going to change the way the other car is driving and will probably make them a worse and more dangerous driver. My behavior is not logical or ethical.
Doing the right thing can be difficult when that thing conflicts with other rules in your life. A sign can read “stay off the grass”, but, if your 2-year-old is walking into a hole in the grass, you will ignore that rule. Logic dictates that breaking the rule is the ethical thing to do. If someone is driving in the wrong lane and they are headed straight toward you, your adherence to the law is at your own risk. Rules, just like the lines on the road, are guides for your behavior. They establish guidelines but they are not automatically added to the programming of your brain. You must know when to adhere to them and when it is logical to ignore them.
People are good despite the religion they believe in not because of it. Religion is not logical and therefore not automatically ethical. Religion is a belief in the supernatural. No peer-reviewed scientific study has presented convincing evidence of anything beyond what nature has produced. The only evidence for supernatural beings is that people have said they exist. Science can be used and often is used illogically and unethically. When these scientific studies get peer-reviewed, they will be invalidated by other scientists. The same process does not happen in religion.
If a religious teaching happens to be logical that does not mean all religious teachings are logical. The teachings are supposedly based on rules handed down by supernatural beings. We know that supernatural beings do not exist so we know that whoever first wrote these rules is the source of the rules. All the rules are suspect because of the source of the rules. Those who follow these illogical rules are following unethical rules. These rules are not necessarily going to coincide with the rest of society and depending on how long ago these rules were created, they will not coincide with a non-religious society.