Generally, you don't do anything unless you stand to gain from it. Most people weight what they stand to gain vs what they stand to lose and make the decision from there.
Generally, what you stand to lose depends on your social contracts. We create social contracts to protect us from others, and others from ourselves. In a civilization, this usually manifests itself as "the law". This can also be the implied terms of a friendship/marriage, or the rules of a club or religion.
Generally, if you break the social contract, it no longer protects you to a certain extent.
So, while the law says "You can't murder" it also protects you (in theory) from being murdered. However, if you choose to murder, you may not find yourself protected from being murdered under the law (capital punishment). However, if you deem that whatever you gain from murder is worth whatever consequences come from breaking the contract, then you may choose to murder regardless of the social contract.
It's essentially the concept behind "the golden rule".
Generally, what you stand to lose depends on your social contracts. We create social contracts to protect us from others, and others from ourselves. In a civilization, this usually manifests itself as "the law". This can also be the implied terms of a friendship/marriage, or the rules of a club or religion.
Generally, if you break the social contract, it no longer protects you to a certain extent.
So, while the law says "You can't murder" it also protects you (in theory) from being murdered. However, if you choose to murder, you may not find yourself protected from being murdered under the law (capital punishment). However, if you deem that whatever you gain from murder is worth whatever consequences come from breaking the contract, then you may choose to murder regardless of the social contract.
It's essentially the concept behind "the golden rule".