The area of the brain that regulates emotion is called the limbic system. It sits in between the brain stem, which regulates basic behaviors like heartbeat and sensory perception, and the cerebral cortex, where thought is housed.
All cerebral brain activity, what we call thought, as well as sensory input, coming in the other end from the brain stem, is observed by the limbic system and the limbic system has the capability to flood the cerebrum with activity, overriding it. It’s literally the meat of the sandwich between our core functioning and our thought processes.
Because our emotions have the ability to override our rational, thinking mind, human societies develop moral codes to help us deal with the consequences of doing that. For a long time, humans in small tribes, like tribes of apes, would kill each other for perceived slights.
This can’t be considered morally wrong because there weren’t any morals for them to be able to understand, morality has to be invented before people can use it.
The altruistic instinct is something that results from reward centers that exist in the brain. We feel good when we help other people. Without altruism, humans cannot collect into societies and cooperate with each other. But the altruistic instinct is not like the fight or flight mechanism, it cannot override the brain and force us to be altruistic.
Human society therefore seeks to avoid amygdala override by instituting moral codes to keep situations that lead to killing each other from happening. They’re varyingly successful and the most advanced ones are the systems of law in modern democratic societies.
Reward areas in the brain work by creating a diverse mix of various neuro-transmitters that go all over the brain and generate good feelings. Motivation to do stuff, pleasure, love. Not only altruistic things we do can give us pleasure, but also selfish things. So we need the laws and codes.
The cerebrum, the rational, thinking part, has two parts, the left and the right. There are three connecting bundles of neurons in between them. So they can communicate with each other without necessarily going through the limbic system. When the limbic system isn’t overriding them, the cerebrum is free to think abstractly and reflect on itself. We call this rational thought, thought that can be introspected. It can also be overridden as described, not just by the limbic system but also by the brain stem.
Cerebral thought is distinguished by having relatively low amounts of emotional content. The limbic system never goes fully quiet, there is always emotional input to your thought processes, but we can distinguish between rational and irrational thought. Irrational thought is seemingly rational thought that is actually being heavily influenced by limbic overrides. The cerebrum thinks and analyzes, but limbic override forces it to conclude before it can finish all the analysis it needs.
Reading all this makes it sound like the limbic system is a hindrance, but remember all of the brain’s reward centers are located there. And it processes things much faster than the cerebrum can. So it can save our lives when it encounters danger by allowing us to quickly react. This is crucial also in social situations where your mind doesn’t have the time to rationally process information before you make a response.
So to sum up, altruism is located in the limbic system but the actual nuts and bolts of good behavior are determined by rational thought and so must be transmitted through culture to other humans.