There is considerable disagreement about this point.
One prominent argument in political philosophy, found in John Rawls’ book A Theory of Justice, holds that inequalities in economic and social status can be justified to the extent that they serve the interests of the least-fortunate class in society but not otherwise. In other words, if society of impoverished subsistence farmers finds that the only way to broadly raise living standards is to industrialize and create a small class of rich factory owners, that’s okay. Or if paying doctors substantially more than the average person’s salary is the way to induce people to master the craft of medicine and cure the sick, that’s okay too. Exactly how much inequality this approach (dubbed “the difference principle” by Rawls) would countenance in practice is difficult to say.
Preberite odličen pregled na Voxu o tem, kaj je neenakost, kako jo merimo in ali je neenakost nekaj slabega.