OK. Long post. But it is not easy to explain with few words.
The lowest level of morality is morality by consequence. Things are considered good or bad based on whether or not they hurt the person. A child touches a hot stove and gets burned, so touching a stove is bad. When reaching into the cookie jar, his mother slaps his hand and he learns that is bad because he will get slapped. A boy comes home late and has video game privileges taken away. A girl is caught telling a lie and is scolded or loses friends. A man robs somebody and goes to jail. These people want to do these things, and would do these things if there were no consequences.
The next level of morality is morality by authority. Things are considered good or bad based on established rules. This means that if you would be punished if you were caught, it is bad even if you know you can get away with it. Everybody is expected to live by the rules all the time, and not just when there will necessarily be consequences. This is where religion comes in. A tribe follows rules set by a tribal leader. People look to elders for guidance on how to behave. A shaman explains illness and magical warfare and spirits. Spirits and magic establish taboos for what is bad (as well as rituals for what is good). Things can be good or bad based on whether or not you follow the rules set by spirits, as they are told by authorities. Appeasing a spirit brings fortune. A sacrifice to a god brings advantage in war. Following the rules of God brings salvation and everlasting life. These people consider things bad based on the established rules.
The next level of morality is morality by empathetic social accord. Things are considered good or bad based on what produces the best society for everyone. This is based on a collective “morality by natural consequence”. It is a morality established by what hurts each individual person. This creates a collective morality. Individual morality is part of an unwritten agreement to respect what hurts another person and creates a better social environment for everyone. It is simply not hurting somebody else (even if it benefits you and you can get away with it, and irrespective of any established laws) because you understand that by hurting that person you contribute to a collective social accord of harm that may then result in others harming you in a similar way (even if they are not caught, and even if there is no law against it).
Theists often argue that without religion (morality by authority), atheists must adhere only to morality by consequence and will do what ever they want (if they think they can get away with it).
A society with only morality by consequence is probably best represented by most young children and many people in maximum security prison (or perhaps gangs as well). These people are selfish and try to get away with anything they can for their own advantage. These people have a moral understanding that this the best method of getting what they want. But in every case, these are not pleasant societies to live in—even for the people at the top. But most people (even atheists) don’t accepts this simplistic morality and live like this.
Most atheists (and even many theists) actually live by morality by empathetic social accord. There was a post in the Community forums by someone who found something valuable in a gas station parking lot and would have turned it into the station manager except that she knew he would keep it for himself so she kept it. That line of reasoning can only be explained by the third level of morality described above.
Atheists don’t run amok. And it is not necessary because they fear the personal consequences of their actions. It may because of a morality that is even more sophisticated and more genuine and more valuable to society than a morality by religious authority.