When any man, even in political society, renders himself by his crimes, obnoxious to the public, he is punished by the laws in his goods and person; that is, the ordinary rules of justice are, with regard to him, suspended for a moment, and it becomes equitable to inflict on him, for the benefit of society, what otherwise he could not suffer without wrong or injury. (III.I.8)
Justice is all about fairness and, in an ideal world, everyone should be treated the same way. But what if someone crosses the line? That's when they're no longer allowed the same rights as other citizens. When a person commits a crime, it's seen as only right to treat them in a way that, usually, would be seen as immoral and unfair. That's the way the cookie crumbles.
If we examine the particular laws, by which justice is directed, and property determined; we shall still be presented with the same conclusion. The good of mankind is the only object of all these laws and regulations. Not only is it requisite, for the peace and interest of society, that men's possessions should be separated; but the rules, which we follow, in making the separation, are such as can best be contrived to serve farther the interests of society. (III.II.1)
If we narrow our focus from the law in general to individual laws, we can see that they work on the same principle. It's all about what's best for society. That's why we have rules about property—first, we recognize that the separation of property is necessary, then we set about putting laws in place to regulate it (otherwise, things would get pretty messy).
The safety of the people is the supreme law: All other particular laws are subordinate to it, and dependent on it: And if, in the common course of things, they be followed and regarded; it is only because the public safety and interest commonly demand so equal and impartial an administration. (III.II.11)
Just in case we haven't got the message, Hume flags the one thing that overrides everything else: safety of the people. There are heaps of rules and laws in society and, while there are always exceptions, they're generally understood and obeyed. The reason? People realize that they're for the good of society as a whole.
What is a man's property? Anything which it is lawful for him, and for him alone, to use. But what rule have we, by which we can distinguish these objects? Here we must have recourse to statutes, customs, precedents, analogies, and a hundred other circumstances; some of which are constant and inflexible, some variable and arbitrary. But the ultimate point [...] is the interest and happiness of human society. (III.II.14)
Property is something we take for granted, but philosophy is about exploring why things are the way they are. So, what about property? Well, this is something that the law recognizes as belonging to someone, and all kinds of bills, customs, and examples are used to back this up—some of which are rock solid, while others are temporary and changeable. The sheer number of rules and regulations can get confusing, but we always come back to what's good for society.
What need of positive law where natural justice is, of itself, a sufficient restraint? Why create magistrates, where there never arises any disorder or iniquity? Why abridge our native freedom, when, in every instance, the utmost exertion of it is found innocent and beneficial? It is evident, that, if government were totally useless, it never could have place, and that the sole foundation of the duty of allegiance is the advantage, which it procures to society, by preserving peace and order among mankind. (IV.I)
Here, Hume demonstrates the reasoning behind justice and the law. Some virtues are natural and, if that were the case with justice, then government wouldn't need to exist. The idea of freedom may be appealing but, in reality, there must be a need for some kind of order and regulation. If there weren't, these things wouldn't exist. So, why are they needed? Because, unlimited freedom would lead to disorder and inequality—Agent K had the right idea.
Among nations, where an immoral gallantry, if covered with a thin veil of mystery, is, in some degree, authorized by custom, there immediately arise a set of rules, calculated for the conveniency of that attachment. The famous court or parliament of love in Provence formerly decided all difficult cases of this nature. (IV.17)
In many nations, immoral behavior is either punished through the justice system (when a law has been broken) or criticized for the harm caused to society. But Hume points to settings where some kinds of behavior aren't automatically seen as vices and things get more tricky. These matters can't be decided in traditional courts, so alternatives such as courts of love have been set up to deal with these cases—kind of like an old-school Judge Judy.
In societies for play, there are laws required for the conduct of the game; and these laws are different in each game. The foundation, I own, of such societies is frivolous; and the laws are, in a great measure, though not altogether, capricious and arbitrary. So far is there a material difference between them and the rules of justice, fidelity, and loyalty [...] The comparison, therefore, in these respects, is very imperfect. We may only learn from it the necessity of rules, wherever men have any intercourse with each other. (IV.18)
When societies don't have clear, fixed rules, how do they function? We shouldn't assume that they have no regulation and that it's complete chaos. It may be that they do have rules, but these rules are flimsy or unsteady. In Hume's opinion, though, this isn't much better, and we can't really compare this setup with a society that has a proper government and rules of justice (just look at what goes down in Children of the Corn. Yikes!). All it tells us is that there's a need for rules in some shape or form.
To carry the matter farther, we may observe, that it is impossible for men so much as to murder each other without statutes, and maxims, and an idea of justice and honour. War has its laws as well as peace; and even that sportive kind of war, carried on among wrestlers, boxers, cudgel-players, gladiators, is regulated by fixed principles. Common interest and utility beget infallibly a standard of right and wrong among the parties concerned. (IV.20)
We may think that rules are overthrown when people commit crimes or in times of war, but nope. Even people like robbers have their own insider codes of conduct, and war is regulated, too. The same goes for the rules that govern sports like boxing, wrestling, and dodgeball. The point is, even when they're not laid down by the government, rules are set up wherever they're necessary and useful.
Inanimate objects may bear to each other all the same relations which we observe in moral agents; though the former can never be the object of love or hatred, nor are consequently susceptible of merit or iniquity. A young tree, which over-tops and destroys its parent, stands in all the same relations with Nero, when he murdered Agrippina; and if morality consisted merely in relations, would no doubt be equally criminal. (AI.17)
Remember Hume's argument that we can't study morality in the same way that we would math? He demonstrates this using an example taken from Roman history. You don't have to be a history geek to get his point, though. By comparing a tree destroying its parent to a human murdering another human, we see that that this comparison is an epic fail. Sure, it may work in principle but, on a moral level, we just don't see trees or objects in the same way that we do humans, unless you're a hardcore treehugger.
By the laws of society, this coat, this horse is mine, and ought to remain perpetually in my possession [...] by depriving me of it, you disappoint my expectations, and doubly displease me, and offend every bystander [...] What injures the community, without hurting any individual, is often more lightly thought of. But where the greatest public wrong is also conjoined with a considerable private one, no wonder the highest disapprobation attends so iniquitous a behaviour. (AIII.11)
Hume makes it clear throughout his enquiry that public harm is looked down on: when individuals act in a way that's not good for society, they're given a slap on the wrist. But this doesn't mean that the individual doesn't matter. If someone's suffering, we don't just think "oh well, they're only one person. Who cares?" Where public harm is accompanied by individual suffering, we feel all the more angry (and you won't like us when we're angry).