For thousands of years, people have created for themselves societies to live in and have expressed moral codes to both define those societies and to recommend improvements to them. Because all human beings are imperfect, the moral codes they create are also imperfect, but the principles of free inquiry, experimentation, and empiricism enable us to determine those ethical codes that work better than others in creating and maintaining societies that work for the good of the most people.
The danger comes when misguided people attempt to impede one or more of these processes. They suppress free inquiry though censorship, they cut off social experimentation through political tyranny favoring the status quo, and/or they deny empiricism by invoking religious dogmatism to claim without proof that a certain moral code from ancient times is as applicable today as it was when the moral code was first formulated. The results have been clearly shown repeatedly throughout history: social stagnation leading to violent revolution, leading again to social stagnation. Various forms of bigotry and extremism expressed by people either favoring one group of people over all others, or attempting to be “consistent” with a narrow point of view that itself cannot be supported empirically, result in social divisions that lead to violence when those impulses are not restrained.Science by itself cannot dictate ethics, but it can and should test ethical standards and rules that originate from religion and philosophy to either support or falsify them. The best rules are those that provide for the welfare of the most people over the longest period of time, rather than those that help a group of people in the short term.