My question is about law and morality.
It is commonly assumed that intentionality/ purpose is an important factor in determining how morally 'good' an action is. For example if I give to charity because I honestly care about the cause and hope to improve society by supporting this cause, my action would be considered more morally good than someone who donates to improve their public reputation (why companies are often involved in charity work for example). So an act which is committed for altruistic reasons is often considered more moral than one primarily committed for selfish reasons/ reasons that will directly benefit the person.
However, the introduction of laws, with associated punishments for transgressing these laws, can change the intentionality of people’s behaviour from altruistic to self-centred. For example if it wasn't illegal to steal from a shop, people’s reason/justification for not stealing would most probably be a moral one (i.e. stealing is wrong, stealing harms society etc). But since stealing is illegal, people’s dominant/ most cognitively obvious reason for not stealing would often be a far more selfish/ self-centred one of avoiding punishment or perhaps rather more morally neutral desire for wanting to obey laws/ fit into society etc.
So since laws often reduce people’s capacity for altruistically-motivated behaviour (due to the added motivation of avoiding punishment), do laws diminish people’s capacity for morally good behaviour in many circumstances?
Or is altruistic behaviour often an illusion, and all human behaviour is selfish to some degree?
Or does this issue not really matter, since these laws are supposed to bring justice and reduce the incidence of these immoral acts, which far trumps the above possible negative effect?