If it's a mutually agreed thing
There's more than one scenario falling under those terms which i would have no problem with.
what if you are powerful and don't fear being hurt
The idea as i see it is to gain collective benefit. That is, it's beneficial to me and to others on many levels to avoid hurting each other, as much as we can. If i were to become powerful enough so as not to have to worry about being hurt, there's still for example:
1) My own empathy, which i neither could nor want to eliminate.
2) My loved ones, who might not necessarily be as powerful as me (thus i should still abide by this code of collective benefit and promote it, rather than go against it myself).
Now, i can of course be inconsistent. I can break it and still promote it and pretend to be embracing of it. But then i'd feel lousy about myself, and i don't want to feel that way. I also would be contributing to the failure of that code, which like i said i should care about for the sake of my loved ones for example (assuming i had no personal inclinations to abide by it).
But in truth, i do have such inclinations. As it is, i see life in a mostly negative way. Not in any objective sense, or because it
should be better from my perspective. There are no grounds based upon which i could make such claim. However, it's just the way i am. My reasonably or unreasonably developed expectations are disappointed, and that's that. Abiding by the code of collective benefit helps make life better from my perspective. Even if i changed and managed to over come my general disappointment, i would still probably find the code of collective benefit to be more positive (in the sense of how it makes me feel) than the code of everyone doing what they want regardless of it's harms to others.
Basically, it's inline with my goals, my personality and my circumstances to want to abide by this code, regardless of how powerful i am or become. That said, i can't deny that it would be very tempting to break that code in such circumstances, and that of course, i have broken it before. That's mainly because we naturally have conflicting emotions, so certain ones may win out sometimes even if they are mostly outnumbered by an opposing set of emotions. Generally, if someone doesn't want to abide by this code, doesn't need it or can't help wanting to hurt others, i don't really think his/her morality or ethics are 'wrong' in general like that or in any objective sense.
Rather i just have a conflict of interest with him/her. I use words like wrong and immoral only with people who have common basis in their view of morality with me, because it's understood what's implied or meant. For instance, i wouldn't use them when conversing with a serial killer. I would convey the same ideas, just without the use of such loaded terms.
Now, i have a set of opposing emotions towards people i have a conflict of interest with. On one hand, hate, anger, etc.. and on the other understanding or empathy. Usually, when those people are very powerful, and/or when they are successful in their goals (harming others), they stimulate more of the less tolerant emotions from me (anger/nonacceptance and possibly hate), even though the others get stimulated too. They make me develop a more powerful opposition towards them. When they're weak or much less powerful, and/or are easily overcome by society, i also feel all those emotions, but more on the side of sympathizing and wishing they were different etc..
You wanting to be hurt doesn't mean others want it too. Your acceptance of getting hurt doesn't somehow negate that others might not have it. Thus a reasonable agreement must be reached in order to resolve this possible conflict.