A system is unjust when it treats people differently without a good reason for this different treatment. Obviously what counts as a good reason will be debatable, but to get started let us consider only reasons that all parties can understand as good reasons. Racism then is unjust because there is no good reason behind the unequal treatment given to the different races. Of course the racist does have a justification for their bias, they will claim that the other races are inferior. But this is not a reason that both parties will understand, while people of the same race as the racist may agree with him, few members of the races being oppressed will consider themselves naturally inferior. And the racist lacks objectively sound evidence that could in principle convince everyone of that judgment. On the other hand the fact that people receive different treatment according to their wealth in a capitalist system is not necessarily unfair. The justification for this unfair treatment is that the wealthy can spend more money, and hence catering to their needs receives more generous compensation. Thus pricing a good out of someone’s ability to purchase it isn’t unjust, because there is an objective fact of the matter that they simply can’t give as much to you for it as others may be able to. Of course this doesn’t mean that there may not be a good reason to moderate capitalism as well, the poor may argue that principle X implies that they should receive some special treatment. But this is not a rejection of the reasons behind the unequal treatment resulting from a difference in wealth, and hence such unequal treatment is not unjust.
According to this principle utilitarianism is unjust because it treats people differently based on their capacity for happiness; although utilitarians can appeal to their principles to justify this different treatment, so can racists, and like the racist the utilitarian arguments are not based on objective facts. But before we get into the details allow me to give examples of some groups of people who would be treated unfairly in a purely utilitarian system. The first are those who have no capacity for happiness or unhappiness. There are rare people born without this ability, and we can easily imagine possible species (such as the Vulcans from Star Trek) or conscious computers (such as Data, also from Star Trek) who lack it as well. Utilitarianism cares only about maximizing happiness or pleasure, and so these people effectively wouldn’t count; their treatment would be invisible to the system. Since we can’t make the Vulcans unhappy we would be free to exploit them, turn them into slaves, or whatever else would make us happy. And since we can’t make them happy there is no reason for the system to give them any of the rights or privileges that make us happy. Since they aren’t made unhappy by this treatment the total amount of happiness may be increased, and hence utilitarianism as a system would endorse it. Also treated unfairly are people who are in a permanent state of unhappiness. It isn’t inconceivable that someone might have a condition that prevents them from being happy, and, although many such people might choose to end their lives, there would probably be some who would still choose life. A utilitarian system would take that choice away from them, and to execute them immediately, since they will always be unhappy (negative happiness) eliminating them would increase the total amount of happiness.
If such actions could be considered just it would only be if we could somehow convince these people that abusing them on the basis of their capacity for happiness is reasonable, which means convincing them of the validity of utilitarianism. This may be impossible, and not just because utilitarianism advocates acting against their interests. Consider an alien species who is rational, and has emotions, but whose emotions don’t correspond to human emotions. While we are naturally motivated to try to be as happy as possible these aliens are naturally motivated to bring the strength of their Zeb and Geb emotions into balance. Could we convince these aliens that maximizing happiness is reason for them to be treated differently? I am sure that we could make them understand that we are motivated by happiness, and that we wish to maximize it. But they won’t see that as a good reason to let themselves be abused, just as we don’t see another’s desire to steal as good reason to let them steal. No, we will reply that we have interests of our own that stealing from us hurts, and there is no good reason to favor the desire to steal over the desire to be stolen from, and every reason to do the opposite. Similarly, the aliens will reply to us that maximizing total happiness is also against their interests, and that they can’t see a reason to systematically favor happiness over a balance of Zeb and Geb.
Moreover the aliens will wonder how happiness, a quirk of our physiological construction, can be invoked as an objective reason to treat people differently. Certainly our own happiness may be taken into account when we act, but it is irrational to act on the basis of other people’s happiness because we have no direct access to it. If someone comes up to us an tells us that they are extremely unhappy, but that a donation of $10 can make then happy again does this supposed suffering give us a reasons to give them money? Of course they could be lying, but they could be telling the truth as well, and since happiness is basically internal we aren’t in much of a position to tell the difference. And because happiness is internal there is nothing stopping us from distorting our judgments of it to justify all kinds of biases. For example, the racist can argue that other races have a diminished capacity for happiness, and that this justifies mistreating them to serve our own needs, and no one can disprove him. Thus it is reasonable to insist that actions be justified by an appeal to objectively measurable consequences that all parties can have a reason to endorse when it comes to creating a system for everyone to live under. And maximizing happiness isn’t among these.