Simplistically, I think this topic is best addressed with reference to animal behaviour, particularly dog behaviour.
My opinion is that there is no such thing as ‘good’ or ‘bad’ behaviour among
animals in the wild. They just do what nature hard-wired them to do, with some added nurturance modifications. For example if a suckling pup nips its mother’s teat, it gets a nip back and quickly learns that nipping a teat results in ‘hurt’ and a behavioural modification is learned. But this does not require any awareness of the terms ‘good’ or ‘bad’, as we human beings know the terms. Without rules, there is no good or bad, there is just adjustment to conflicting needs.
With
domestic dogs and cats it’s different. We can train them to accept all sorts of rules regarding their behaviour. We have rules requiring them to eat, defecate, urinate and sleep in designated places in our houses. We regard them as being good or bad on the basis of whether they conform or not. This applies also to the rules of behaviour they should manifest toward other human beings or other pets. Every domestic pet owner I know, repetitively uses rewards for good behaviour along with the words 'good dog' or else 'No!" or 'bad boy' for undesirable behaviour. They get to know by rewards and tone of voice what the rules are.
With our species, we apply the same judgments of ‘being good’ or ‘being bad’ to members of our kind, depending on whether they conform to or ignore the innumerable rules that apply within our various groups.
We have rules at almost every level that we function:- House, Public transport, Traffic, School, Workplace, Club, Public Institution, Church and Religion, Local Government, State Government, Federal Government, Economic Bloc, International Government.
If we conform to the rules at each level, we are ‘being good’, and if we ignore them or flaunt them we are ‘being bad’ in the eyes of members of which ever group whose laws we are observing at any given time.
And the standards of rules for judging good or bad can be quite different between different groups. For example a successful bomber of any past or present terrorist organisation who kills large numbers of men, women and children can be regarded as being good (even a hero) by the terrorist group, but as bad (a cold-blooded mass killer) by the group that has been massacred.