Steinbeck (in Grapes of Wrath?) had a character recite the 5 levels of moral development. It went something like this:
1) I don't want to get in trouble
2) I want to please someone
3) I want to follow the rules
4) I want to help other people
and the highest level,
5) I have a personal moral code, and I abide by it
He explained these as levels we reach with age - entering school at age 5 or 6 we first hide from trouble. Then in first grade we want to please the nice teacher. Somewhere in middle school kids become rules-lawyers. Later in life they may learn to be philanthropic.
People can be stuck at one of these early levels for life.
I think it's not just age, but the wealth and prosperity that can go along with it. It's easier to have a moral code and look down on those with less when your own needs and wants are secure.