Morality is connected to a system of rules designed to optimize a group of humans. Morality is not designed to optimize the ego or the individual. When optimization is geared to individuals, it is better defined as relative morality.
Thou shall not steal , if applied to everyone in a group, can allow the members of that group to become more optimized. There will be little need to waste time worrying about being robbed and there will be little need to waste resources on various defensive measures. We all are better off by agreeing to this. All ten commandments add this way.
The thief may not feel the same benefit, by not being able to steal. So he/she may chose to use relative morality to justify stealing, so this ego can feel full. Not all relative morality is bad, but most of the evils of the world are justified this way.
The reason morality was designed with the team in mind is because the team can become more than the sum of its parts. A box of auto parts is not as useful as all the same parts assembled into a working automobile. It is the sam parts, but in a more optimized arrangement. They can't be going their own way and still work as an automobile.
But since the team is composed of individuals, with different parts and goals, some team members may choose relative morality, so they can become optimized. If we go back to the box of auto parts, before it is assembled, and the radiator decides it wants to become beefier. This may sound useful bit now it may not fit in the final assembly, thereby adversely impacting the final assembled team; automobile leaks and the hood will not shut.
However, if the team does become more than the sum of its parts, then all the parts get an upgrade. In other words, if you work and sacrifice the ego to became part of a champion team, even as substitute on the bench, you will always be a champion.