Do good and avoid evil is the ethical equivalent of the principle of contradiction. It is the foundation of any rational ethical argument. This is the reason people do not make arguments that we should do what is flatly evil, such as murder or adultery. People rather argue that this or that is not actually evil and not violating the principle of rational ethical discourse.
This is less clear when we talk about being a “bad boy” or not being a “good girl.” Taken at face value they are simply ethical contradictions. However, the substance of the argument consists mainly in the rejection of standards of goodness and badness. A “bad boy” has some good qualities men want and women are attracted to (they could not be otherwise), but which are in contradiction to some standard which is being critiqued or rejected.
An amusing example of this type of ethical incoherence comes in the movie “Mastermind.” There is a discourse where Mastermind talks about how good it is to bad, but it is good that he is bad, but he wants to be bad not good, but…etc. Being bad as such cannot be rationally defended and such an amusing discourse is a reminder of that.
The ultimate move out of this problem is the Nietzschean turn. There simply is not right and wrong. There is nothing but the will. This cannot be anymore coherently defended than a contradiction, but there is no defense of it simply a will to power. The will in such a state is left without an object, yet an object is required otherwise the will would do nothing. The object is power. The simple exercise of the will over other wills. It is an attempt to reject something impossible to reject and we are still left with a good and evil, a right and wrong.
The object however is the most universal and thus ambiguous of ends, an act of will to will. But the will requires some object to will. Some end or other to pursue. Whatever this end is becomes the “good” of the will. The will to will over others, to dominate, the complete actualization of the will or as much as possible. This makes the perfection and good of the will to act without an end or to act on every end. Right and wrong are marginalized as the good of the will is to act, not for this or that end, but to act something, anything, everything. The object of the will is no longer the good, but everything that is willed is good, because it is willed. The good is not the principle of the will, but the will is the principle of what is good.