In Book 3 Hume explores natural virtues (essential to human nature) such as compassion and friendship, and artificial virtues
(social conventions) such as justice, promise-keeping, and allegiance (Hume, 184.108.40.206). Hume's sympathy is the means of communication
through which humans come to understand the sentiments (pains and pleasures) of others and from which humans can determine
vice and virtue (Hume, 220.127.116.11).
The artificial virtues--especially justice and promise-keeping, that most concern Hume's description of society. Though
these virtues are not natural in the sense of being essential, Hume believes they arise naturally in society; therefore, society
arises out of enlightened self-interest. Further, Hume believes humans should naturally join forces to gain power, to form
a division of labor to increase ability, and to increase security through mutual succor (Hume, 18.104.22.168). Justice, then, derives
its origin from self-interest - ``the selfishness and confin'd generosity of man'' (Hume, 22.214.171.124) - and is maintained by
use of sympathy (Hume, 126.96.36.199). Hume goes on to illustrate that like justice, promise-keeping derives from mutual self-interest
(Hume, 188.8.131.52). Hume uses the combination of natural self-interest and a sense of an extended societal self to explain the
origin and continuation of society, justice, and morality.
Source--Hume, David. A Treatise on Human Nature. Ed. Norton and Norton. Oxford UP: 2000.