Between friends there is no need for justice, but people who are just still need the quality of friendship; and indeed friendliness is considered to be justice in the fullest sense. It is not only a necessary thing but a splendid one.
Aristotle makes this assertion in Book VIII, Chapter 1. Neither friendship nor justice is listed in Aristotle’s table of virtues and vices, because both are more general than the particular virtues and vices listed there. In Book V, Aristotle explains that justice comprehends all the virtues, since acting justly consists essentially of acting in accordance with all the virtues.
Aristotle bases his conception of justice on a conception of fair exchange, and does the same for friendship. Friendships are balanced by the fact that each friend gives as much as receives. Hence, justice and friendship are closely connected.
Citizens in the Greek city-states were expected to take a very active role in the government of their city-state, so justice and civic duty would have been a concern for all. A complete life could not have been lived in solitude, so justice and friendliness between fellow citizens was essential.