This is a definition based on natural law. A more common use is described by
Laws are the set of rules by which governments control the people.
Many laws are put in place for very good reason. Laws preventing murder, rape, theft and assault.
Other laws are assaults on freedom. Populations typically allow the most amazing laws to be imposed on them. For instance, forgetting to remove an old registration sticker from a car is against the law in Australia (it says so on the back). Even if the new sticker is in place, forgetting to remove the old sticker is an offense. The astonishing thing about this is that the stickers change color every year. A law enforcement officer only need to learn that this year he needs to check the green sticker, and ignore the red one.
Presumably it is easier for law enforcement officers to check cars toward the end of the year because there will be less and less of those colors left on the cars.
We are threatened with prison for forgetting to make it easier for the authorities to check whether other people are breaking the law. In an open and relatively free democracy, we tolerate some of the the pettiest controls on our lives imaginable.
We also subjected to laws outlawing on victimless crimes - crimes in which only consensual adults are involved, and in which there is no victim, or complainant.