CyberJesus is hitting on an important point.
Free Will is an illusion. We certainly "feel" like are making choices. What is actually going on is the brain is running a calculation program.
That calculation program consists of multiple points of input -
- Belief structures
- Current information
- Past experiences
- Desires
- Temperament
Input is also affect by the law of cause and effect as well as the other natural laws of the universe.
They illusion of free will comes from our consciousness being aware that the calculation is being made combine with our inability to predict the end result of what will happen.
Our brains are constantly running "software" that optimize our wellbeing. Cause harm to others and others' software calculations will result in treating you accordingly. Cause harm you are the problem. Others' actions, such as confining you to a place where you cannot harm them, are the result. This process is where the idea of morality comes from.